diff --git a/test/dom/ComponentHarness.mocha.js b/test/dom/ComponentHarness.mocha.js index 3273e7bd..7f22f37c 100644 --- a/test/dom/ComponentHarness.mocha.js +++ b/test/dom/ComponentHarness.mocha.js @@ -1,6 +1,6 @@ -var expect = require('chai').expect; -var Component = require('../../src/components').Component; -var domTestRunner = require('../../src/test-utils/domTestRunner'); +import { expect } from 'chai'; +import { Component } from '../../src/components'; +import * as domTestRunner from '../../src/test-utils/domTestRunner'; describe('ComponentHarness', function() { var runner = domTestRunner.install(); diff --git a/test/dom/as.mocha.js b/test/dom/as.mocha.js index e8229366..54a4094b 100644 --- a/test/dom/as.mocha.js +++ b/test/dom/as.mocha.js @@ -1,5 +1,5 @@ -var expect = require('chai').expect; -var domTestRunner = require('../../src/test-utils/domTestRunner'); +import { expect } from 'chai'; +import * as domTestRunner from '../../src/test-utils/domTestRunner'; describe('as', function() { var runner = domTestRunner.install({ diff --git a/test/dom/bindings.mocha.js b/test/dom/bindings.mocha.js index 66318fef..27e4d2f9 100644 --- a/test/dom/bindings.mocha.js +++ b/test/dom/bindings.mocha.js @@ -1,5 +1,5 @@ -var expect = require('chai').expect; -var domTestRunner = require('../../src/test-utils/domTestRunner'); +import { expect } from 'chai'; +import * as domTestRunner from '../../src/test-utils/domTestRunner'; describe('bindings', function() { const runner = domTestRunner.install(); diff --git a/test/dom/components.browser.mocha.js b/test/dom/components.browser.mocha.js index a998bcb0..ca0dce89 100644 --- a/test/dom/components.browser.mocha.js +++ b/test/dom/components.browser.mocha.js @@ -1,6 +1,6 @@ -const expect = require('chai').expect; -const templates = require('../../src/templates').templates; -const domTestRunner = require('../../src/test-utils/domTestRunner'); +import { expect } from 'chai'; +import { templates } from '../../src/templates'; +import * as domTestRunner from '../../src/test-utils/domTestRunner'; describe('components', function() { const runner = domTestRunner.install(); diff --git a/test/dom/components.mocha.js b/test/dom/components.mocha.js index 1d9adcca..5fca0364 100644 --- a/test/dom/components.mocha.js +++ b/test/dom/components.mocha.js @@ -1,7 +1,7 @@ -var expect = require('chai').expect; -var pathLib = require('node:path'); -const { Component } = require('../../src/components'); -var domTestRunner = require('../../src/test-utils/domTestRunner'); +import { expect } from 'chai'; +import * as pathLib from 'node:path'; +import { Component } from '../../src/components'; +import * as domTestRunner from '../../src/test-utils/domTestRunner'; describe('components', function() { var runner = domTestRunner.install(); diff --git a/test/dom/dom-events.mocha.js b/test/dom/dom-events.mocha.js index d3a56631..ec26199c 100644 --- a/test/dom/dom-events.mocha.js +++ b/test/dom/dom-events.mocha.js @@ -1,5 +1,5 @@ -var expect = require('chai').expect; -var domTestRunner = require('../../src/test-utils/domTestRunner'); +import { expect } from 'chai'; +import * as domTestRunner from '../../src/test-utils/domTestRunner'; describe('DOM events', function() { const runner = domTestRunner.install(); diff --git a/test/dom/domTestRunner.mocha.js b/test/dom/domTestRunner.mocha.js index 22e581a9..66be8f3e 100644 --- a/test/dom/domTestRunner.mocha.js +++ b/test/dom/domTestRunner.mocha.js @@ -1,4 +1,4 @@ -var domTestRunner = require('../../src/test-utils/domTestRunner'); +import * as domTestRunner from '../../src/test-utils/domTestRunner'; describe('domTestRunner', function() { describe('with JSDOM option pretendToBeVisual', function() { diff --git a/test/dom/forms.browser.mocha.js b/test/dom/forms.browser.mocha.js index e4d00b31..54a434ac 100644 --- a/test/dom/forms.browser.mocha.js +++ b/test/dom/forms.browser.mocha.js @@ -1,12 +1,11 @@ -var expect = require('chai').expect; -var domTestRunner = require('../../src/test-utils/domTestRunner'); +import { expect } from 'chai'; +import * as domTestRunner from '../../src/test-utils/domTestRunner'; describe('forms', function() { const runner = domTestRunner.install(); - const { window } = runner; function createEvent(type) { - return new window.Event(type, {bubbles: true}); + return new runner.window.Event(type, {bubbles: true}); } describe('textarea', function() {