From 6d5b65065251e1fc57d6369f5bc35e1af98f5b40 Mon Sep 17 00:00:00 2001 From: Craig Beck Date: Tue, 9 Jul 2024 18:43:38 -0700 Subject: [PATCH] Revert "Change requires to imports" This reverts commit 3e983b7d5eb4e4a77d487e9465cb1b767689f8d1. --- test/dom/ComponentHarness.mocha.js | 6 +++--- test/dom/as.mocha.js | 4 ++-- test/dom/bindings.mocha.js | 4 ++-- test/dom/components.browser.mocha.js | 6 +++--- test/dom/components.mocha.js | 8 ++++---- test/dom/dom-events.mocha.js | 4 ++-- test/dom/domTestRunner.mocha.js | 2 +- test/dom/forms.browser.mocha.js | 7 ++++--- 8 files changed, 21 insertions(+), 20 deletions(-) diff --git a/test/dom/ComponentHarness.mocha.js b/test/dom/ComponentHarness.mocha.js index 7f22f37c..3273e7bd 100644 --- a/test/dom/ComponentHarness.mocha.js +++ b/test/dom/ComponentHarness.mocha.js @@ -1,6 +1,6 @@ -import { expect } from 'chai'; -import { Component } from '../../src/components'; -import * as domTestRunner from '../../src/test-utils/domTestRunner'; +var expect = require('chai').expect; +var Component = require('../../src/components').Component; +var domTestRunner = require('../../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 54a4094b..e8229366 100644 --- a/test/dom/as.mocha.js +++ b/test/dom/as.mocha.js @@ -1,5 +1,5 @@ -import { expect } from 'chai'; -import * as domTestRunner from '../../src/test-utils/domTestRunner'; +var expect = require('chai').expect; +var domTestRunner = require('../../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 27e4d2f9..66318fef 100644 --- a/test/dom/bindings.mocha.js +++ b/test/dom/bindings.mocha.js @@ -1,5 +1,5 @@ -import { expect } from 'chai'; -import * as domTestRunner from '../../src/test-utils/domTestRunner'; +var expect = require('chai').expect; +var domTestRunner = require('../../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 ca0dce89..a998bcb0 100644 --- a/test/dom/components.browser.mocha.js +++ b/test/dom/components.browser.mocha.js @@ -1,6 +1,6 @@ -import { expect } from 'chai'; -import { templates } from '../../src/templates'; -import * as domTestRunner from '../../src/test-utils/domTestRunner'; +const expect = require('chai').expect; +const templates = require('../../src/templates').templates; +const domTestRunner = require('../../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 5fca0364..1d9adcca 100644 --- a/test/dom/components.mocha.js +++ b/test/dom/components.mocha.js @@ -1,7 +1,7 @@ -import { expect } from 'chai'; -import * as pathLib from 'node:path'; -import { Component } from '../../src/components'; -import * as domTestRunner from '../../src/test-utils/domTestRunner'; +var expect = require('chai').expect; +var pathLib = require('node:path'); +const { Component } = require('../../src/components'); +var domTestRunner = require('../../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 ec26199c..d3a56631 100644 --- a/test/dom/dom-events.mocha.js +++ b/test/dom/dom-events.mocha.js @@ -1,5 +1,5 @@ -import { expect } from 'chai'; -import * as domTestRunner from '../../src/test-utils/domTestRunner'; +var expect = require('chai').expect; +var domTestRunner = require('../../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 66be8f3e..22e581a9 100644 --- a/test/dom/domTestRunner.mocha.js +++ b/test/dom/domTestRunner.mocha.js @@ -1,4 +1,4 @@ -import * as domTestRunner from '../../src/test-utils/domTestRunner'; +var domTestRunner = require('../../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 54a434ac..e4d00b31 100644 --- a/test/dom/forms.browser.mocha.js +++ b/test/dom/forms.browser.mocha.js @@ -1,11 +1,12 @@ -import { expect } from 'chai'; -import * as domTestRunner from '../../src/test-utils/domTestRunner'; +var expect = require('chai').expect; +var domTestRunner = require('../../src/test-utils/domTestRunner'); describe('forms', function() { const runner = domTestRunner.install(); + const { window } = runner; function createEvent(type) { - return new runner.window.Event(type, {bubbles: true}); + return new window.Event(type, {bubbles: true}); } describe('textarea', function() {