aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/cache-map.test.js2
-rw-r--r--test/data/html/test-document2-script.js30
-rw-r--r--test/object-property-accessor.test.js6
-rw-r--r--test/profile-conditions-util.test.js32
4 files changed, 35 insertions, 35 deletions
diff --git a/test/cache-map.test.js b/test/cache-map.test.js
index 3e7def1f..df891188 100644
--- a/test/cache-map.test.js
+++ b/test/cache-map.test.js
@@ -30,7 +30,7 @@ function testConstructor() {
[true, () => new CacheMap(1.5)],
[true, () => new CacheMap(Number.NaN)],
[true, () => new CacheMap(Number.POSITIVE_INFINITY)],
- // @ts-ignore - Ignore because it should throw an error
+ // @ts-expect-error - Ignore because it should throw an error
[true, () => new CacheMap('a')]
];
diff --git a/test/data/html/test-document2-script.js b/test/data/html/test-document2-script.js
index 5a6ad4d1..f6082802 100644
--- a/test/data/html/test-document2-script.js
+++ b/test/data/html/test-document2-script.js
@@ -22,17 +22,17 @@
function requestFullscreen(element) {
if (element.requestFullscreen) {
element.requestFullscreen();
- // @ts-ignore - Browser compatibility
+ // @ts-expect-error - Browser compatibility
} else if (element.mozRequestFullScreen) {
- // @ts-ignore - Browser compatibility
+ // @ts-expect-error - Browser compatibility
element.mozRequestFullScreen();
- // @ts-ignore - Browser compatibility
+ // @ts-expect-error - Browser compatibility
} else if (element.webkitRequestFullscreen) {
- // @ts-ignore - Browser compatibility
+ // @ts-expect-error - Browser compatibility
element.webkitRequestFullscreen();
- // @ts-ignore - Browser compatibility
+ // @ts-expect-error - Browser compatibility
} else if (element.msRequestFullscreen) {
- // @ts-ignore - Browser compatibility
+ // @ts-expect-error - Browser compatibility
element.msRequestFullscreen();
}
}
@@ -41,17 +41,17 @@ function requestFullscreen(element) {
function exitFullscreen() {
if (document.exitFullscreen) {
document.exitFullscreen();
- // @ts-ignore - Browser compatibility
+ // @ts-expect-error - Browser compatibility
} else if (document.mozCancelFullScreen) {
- // @ts-ignore - Browser compatibility
+ // @ts-expect-error - Browser compatibility
document.mozCancelFullScreen();
- // @ts-ignore - Browser compatibility
+ // @ts-expect-error - Browser compatibility
} else if (document.webkitExitFullscreen) {
- // @ts-ignore - Browser compatibility
+ // @ts-expect-error - Browser compatibility
document.webkitExitFullscreen();
- // @ts-ignore - Browser compatibility
+ // @ts-expect-error - Browser compatibility
} else if (document.msExitFullscreen) {
- // @ts-ignore - Browser compatibility
+ // @ts-expect-error - Browser compatibility
document.msExitFullscreen();
}
}
@@ -62,11 +62,11 @@ function exitFullscreen() {
function getFullscreenElement() {
return (
document.fullscreenElement ||
- // @ts-ignore - Browser compatibility
+ // @ts-expect-error - Browser compatibility
document.msFullscreenElement ||
- // @ts-ignore - Browser compatibility
+ // @ts-expect-error - Browser compatibility
document.mozFullScreenElement ||
- // @ts-ignore - Browser compatibility
+ // @ts-expect-error - Browser compatibility
document.webkitFullscreenElement ||
null
);
diff --git a/test/object-property-accessor.test.js b/test/object-property-accessor.test.js
index 4f1fa87b..4d50b1e9 100644
--- a/test/object-property-accessor.test.js
+++ b/test/object-property-accessor.test.js
@@ -334,7 +334,7 @@ function testGetPathString2() {
];
for (const [pathArray, message] of data) {
- // @ts-ignore - Throwing is expected
+ // @ts-expect-error - Throwing is expected
expect(() => ObjectPropertyAccessor.getPathString(pathArray)).toThrow(message);
}
});
@@ -424,7 +424,7 @@ function testHasProperty() {
];
for (const [object, property, expected] of data) {
- // @ts-ignore - Ignore potentially property types
+ // @ts-expect-error - Ignore potentially property types
expect(ObjectPropertyAccessor.hasProperty(object, property)).toStrictEqual(expected);
}
});
@@ -449,7 +449,7 @@ function testIsValidPropertyType() {
];
for (const [object, property, expected] of data) {
- // @ts-ignore - Ignore potentially property types
+ // @ts-expect-error - Ignore potentially property types
expect(ObjectPropertyAccessor.isValidPropertyType(object, property)).toStrictEqual(expected);
}
});
diff --git a/test/profile-conditions-util.test.js b/test/profile-conditions-util.test.js
index 30052b34..62b21555 100644
--- a/test/profile-conditions-util.test.js
+++ b/test/profile-conditions-util.test.js
@@ -637,9 +637,9 @@ function testSchemas() {
{expected: true, context: {depth: 0, url: ''}},
{expected: true, context: {depth: 0, url: '', flags: []}},
{expected: false, context: {depth: 0, url: '', flags: ['clipboard']}},
- // @ts-ignore - Ignore type for string flag for testing purposes
+ // @ts-expect-error - Ignore type for string flag for testing purposes
{expected: false, context: {depth: 0, url: '', flags: ['clipboard', 'test2']}},
- // @ts-ignore - Ignore type for string flag for testing purposes
+ // @ts-expect-error - Ignore type for string flag for testing purposes
{expected: false, context: {depth: 0, url: '', flags: ['clipboard', 'test2', 'test3']}}
]
},
@@ -673,9 +673,9 @@ function testSchemas() {
{expected: false, context: {depth: 0, url: ''}},
{expected: false, context: {depth: 0, url: '', flags: []}},
{expected: false, context: {depth: 0, url: '', flags: ['clipboard']}},
- // @ts-ignore - Ignore type for string flag for testing purposes
+ // @ts-expect-error - Ignore type for string flag for testing purposes
{expected: true, context: {depth: 0, url: '', flags: ['clipboard', 'test2']}},
- // @ts-ignore - Ignore type for string flag for testing purposes
+ // @ts-expect-error - Ignore type for string flag for testing purposes
{expected: false, context: {depth: 0, url: '', flags: ['clipboard', 'test2', 'test3']}}
]
},
@@ -711,9 +711,9 @@ function testSchemas() {
{expected: false, context: {depth: 0, url: ''}},
{expected: false, context: {depth: 0, url: '', flags: []}},
{expected: true, context: {depth: 0, url: '', flags: ['clipboard']}},
- // @ts-ignore - Ignore type for string flag for testing purposes
+ // @ts-expect-error - Ignore type for string flag for testing purposes
{expected: true, context: {depth: 0, url: '', flags: ['clipboard', 'test2']}},
- // @ts-ignore - Ignore type for string flag for testing purposes
+ // @ts-expect-error - Ignore type for string flag for testing purposes
{expected: true, context: {depth: 0, url: '', flags: ['clipboard', 'test2', 'test3']}}
]
},
@@ -753,9 +753,9 @@ function testSchemas() {
{expected: true, context: {depth: 0, url: ''}},
{expected: true, context: {depth: 0, url: '', flags: []}},
{expected: true, context: {depth: 0, url: '', flags: ['clipboard']}},
- // @ts-ignore - Ignore type for string flag for testing purposes
+ // @ts-expect-error - Ignore type for string flag for testing purposes
{expected: false, context: {depth: 0, url: '', flags: ['clipboard', 'test2']}},
- // @ts-ignore - Ignore type for string flag for testing purposes
+ // @ts-expect-error - Ignore type for string flag for testing purposes
{expected: true, context: {depth: 0, url: '', flags: ['clipboard', 'test2', 'test3']}}
]
},
@@ -784,9 +784,9 @@ function testSchemas() {
{expected: true, context: {depth: 0, url: ''}},
{expected: true, context: {depth: 0, url: '', flags: []}},
{expected: true, context: {depth: 0, url: '', flags: ['clipboard']}},
- // @ts-ignore - Ignore type for string flag for testing purposes
+ // @ts-expect-error - Ignore type for string flag for testing purposes
{expected: true, context: {depth: 0, url: '', flags: ['clipboard', 'test2']}},
- // @ts-ignore - Ignore type for string flag for testing purposes
+ // @ts-expect-error - Ignore type for string flag for testing purposes
{expected: true, context: {depth: 0, url: '', flags: ['clipboard', 'test2', 'test3']}}
]
},
@@ -819,9 +819,9 @@ function testSchemas() {
{expected: false, context: {depth: 0, url: ''}},
{expected: false, context: {depth: 0, url: '', flags: []}},
{expected: false, context: {depth: 0, url: '', flags: ['clipboard']}},
- // @ts-ignore - Ignore type for string flag for testing purposes
+ // @ts-expect-error - Ignore type for string flag for testing purposes
{expected: true, context: {depth: 0, url: '', flags: ['clipboard', 'test2']}},
- // @ts-ignore - Ignore type for string flag for testing purposes
+ // @ts-expect-error - Ignore type for string flag for testing purposes
{expected: true, context: {depth: 0, url: '', flags: ['clipboard', 'test2', 'test3']}}
]
},
@@ -849,9 +849,9 @@ function testSchemas() {
{expected: true, context: {depth: 0, url: ''}},
{expected: true, context: {depth: 0, url: '', flags: []}},
{expected: true, context: {depth: 0, url: '', flags: ['clipboard']}},
- // @ts-ignore - Ignore type for string flag for testing purposes
+ // @ts-expect-error - Ignore type for string flag for testing purposes
{expected: true, context: {depth: 0, url: '', flags: ['clipboard', 'test2']}},
- // @ts-ignore - Ignore type for string flag for testing purposes
+ // @ts-expect-error - Ignore type for string flag for testing purposes
{expected: true, context: {depth: 0, url: '', flags: ['clipboard', 'test2', 'test3']}}
]
},
@@ -885,9 +885,9 @@ function testSchemas() {
{expected: true, context: {depth: 0, url: ''}},
{expected: true, context: {depth: 0, url: '', flags: []}},
{expected: false, context: {depth: 0, url: '', flags: ['clipboard']}},
- // @ts-ignore - Ignore type for string flag for testing purposes
+ // @ts-expect-error - Ignore type for string flag for testing purposes
{expected: false, context: {depth: 0, url: '', flags: ['clipboard', 'test2']}},
- // @ts-ignore - Ignore type for string flag for testing purposes
+ // @ts-expect-error - Ignore type for string flag for testing purposes
{expected: false, context: {depth: 0, url: '', flags: ['clipboard', 'test2', 'test3']}}
]
},