Skip to content

Commit 189e7ad

Browse files
authored
Deprecate isRepoFile404 (#251)
1 parent 45677d5 commit 189e7ad

2 files changed

Lines changed: 1 addition & 10 deletions

File tree

‎index.test.ts‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,16 +134,6 @@ test('isPRFile404', () => {
134134
assert.equal(pageDetect.isPRFile404(), false);
135135
});
136136

137-
test('isRepoFile404', () => {
138-
document.title = 'File not found';
139-
location.href = 'https://github.com/fregante/GhostText/tree/3cacd7df71b097dc525d99c7aa2f54d31b02fcc8/chrome/scripts/InputArea';
140-
assert.ok(pageDetect.isRepoFile404());
141-
142-
document.title = 'File not found';
143-
location.href = 'https://github.com/refined-github/refined-github/blob/some-non-existent-ref/source/features/bugs-tab.tsx';
144-
assert.ok(pageDetect.isRepoFile404());
145-
});
146-
147137
const {getRepositoryInfo} = pageDetect.utils;
148138
test('getRepositoryInfo', () => {
149139
const inputTypes = [

‎index.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,7 @@ TEST: addTests('isFileFinder', [
748748
]);
749749

750750
/**
751+
* @deprecated Use is404 and isSingleFile/isRepoTree directly
751752
* @example https://github.com/fregante/GhostText/tree/3cacd7df71b097dc525d99c7aa2f54d31b02fcc8/chrome/scripts/InputArea
752753
* @example https://github.com/refined-github/refined-github/blob/some-non-existent-ref/source/features/bugs-tab.tsx
753754
*/

0 commit comments

Comments
 (0)