@@ -44,7 +44,7 @@ describe('Runtime checks: should allow element modification', () => {
44
44
scriptElement . id = 'scripty'
45
45
scriptElement . setAttribute ( 'type' , 'application/evilscript' )
46
46
document . body . appendChild ( scriptElement )
47
- const hadInspectorNode = ! ! document . querySelector ( 'ddg-runtime-checks' )
47
+ const hadInspectorNode = scriptElement === document . querySelector ( 'ddg-runtime-checks' )
48
48
// Continue to modify the script element after it has been added to the DOM
49
49
scriptElement . integrity = 'sha256-123'
50
50
// @ts -expect-error https://app.asana.com/0/1201614831475344/1203979574128023/f
@@ -101,7 +101,7 @@ describe('Runtime checks: should allow element modification', () => {
101
101
scriptElement . id = 'scripty2'
102
102
scriptElement . setAttribute ( 'type' , 'application/javascript' )
103
103
document . body . appendChild ( scriptElement )
104
- const hadInspectorNode = ! ! document . querySelector ( 'ddg-runtime-checks' )
104
+ const hadInspectorNode = scriptElement === document . querySelector ( 'ddg-runtime-checks' )
105
105
// Continue to modify the script element after it has been added to the DOM
106
106
// @ts -expect-error https://app.asana.com/0/1201614831475344/1203979574128023/f
107
107
scriptElement . madeUpProp = 'val'
@@ -174,7 +174,7 @@ describe('Runtime checks: should allow element modification', () => {
174
174
document . body . appendChild ( scriptElement )
175
175
await Promise . all ( [ promise , promise2 ] )
176
176
177
- const hadInspectorNode = ! ! document . querySelector ( 'ddg-runtime-checks' )
177
+ const hadInspectorNode = scriptElement === document . querySelector ( 'ddg-runtime-checks' )
178
178
// Continue to modify the script element after it has been added to the DOM
179
179
// @ts -expect-error https://app.asana.com/0/1201614831475344/1203979574128023/f
180
180
scriptElement . madeUpProp = 'val'
@@ -253,7 +253,7 @@ describe('Runtime checks: should allow element modification', () => {
253
253
scriptElement . setAttribute ( 'madeUpAttr1' , '1' )
254
254
scriptElement . setAttribute ( 'madeUpAttr2' , '2' )
255
255
document . body . appendChild ( scriptElement )
256
- const hadInspectorNode = ! ! document . querySelector ( 'ddg-runtime-checks' )
256
+ const hadInspectorNode = scriptElement === document . querySelector ( 'ddg-runtime-checks' )
257
257
// Continue to modify the script element after it has been added to the DOM
258
258
// @ts -expect-error made up prop is unknown to TS
259
259
scriptElement . madeUpProp1 = 'val'
@@ -412,7 +412,7 @@ describe('Runtime checks: should allow element modification', () => {
412
412
scriptElement . id = 'scriptDocumentPrototype'
413
413
scriptElement . setAttribute ( 'type' , 'application/javascript' )
414
414
document . body . appendChild ( scriptElement )
415
- const hadInspectorNode = ! ! document . querySelector ( 'ddg-runtime-checks' )
415
+ const hadInspectorNode = scriptElement === document . querySelector ( 'ddg-runtime-checks' )
416
416
const instanceofResult = scriptElement instanceof HTMLScriptElement
417
417
const scripty = document . querySelector ( 'script#scriptDocumentPrototype' )
418
418
0 commit comments