summaryrefslogtreecommitdiff
path: root/packages/webapi/test/internals.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/webapi/test/internals.js')
-rw-r--r--packages/webapi/test/internals.js38
1 files changed, 15 insertions, 23 deletions
diff --git a/packages/webapi/test/internals.js b/packages/webapi/test/internals.js
index 6972f65a2..054b7e488 100644
--- a/packages/webapi/test/internals.js
+++ b/packages/webapi/test/internals.js
@@ -1,34 +1,26 @@
-import { assert, test } from '../run/test.setup.js'
+import { expect } from 'chai'
import { polyfill } from '../mod.js'
-test(() => {
- return [
- {
- name: 'Includes polyfill.internals functionality',
- test() {
- const target = {}
+it('Includes polyfill.internals functionality', () => {
+ const target = {}
- polyfill(target, { exclude: 'window document' })
+ polyfill(target, { exclude: 'window document' })
- const pseudo = { ...target }
+ const pseudo = { ...target }
- assert.equal(Reflect.has(pseudo, 'document'), false)
+ expect(pseudo).to.not.have.property('document')
- const CustomElement = class extends pseudo.HTMLElement {}
+ const CustomElement = class extends pseudo.HTMLElement {}
- pseudo.customElements.define('custom-element', CustomElement)
+ pseudo.customElements.define('custom-element', CustomElement)
- polyfill.internals(pseudo, 'Document')
+ polyfill.internals(pseudo, 'Document')
- assert.equal(Reflect.has(pseudo, 'document'), true)
+ expect(pseudo).to.have.property('document')
- assert.equal(
- CustomElement.prototype.isPrototypeOf(
- pseudo.document.createElement('custom-element')
- ),
- true
- )
- },
- },
- ]
+ expect(
+ CustomElement.prototype.isPrototypeOf(
+ pseudo.document.createElement('custom-element')
+ )
+ ).to.equal(true)
})