Skip to content

Commit

Permalink
Change requires to imports
Browse files Browse the repository at this point in the history
  • Loading branch information
craigbeck committed Jul 9, 2024
1 parent 512fdca commit 3e983b7
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 21 deletions.
6 changes: 3 additions & 3 deletions test/dom/ComponentHarness.mocha.js
Original file line number Diff line number Diff line change
@@ -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();
Expand Down
4 changes: 2 additions & 2 deletions test/dom/as.mocha.js
Original file line number Diff line number Diff line change
@@ -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({
Expand Down
4 changes: 2 additions & 2 deletions test/dom/bindings.mocha.js
Original file line number Diff line number Diff line change
@@ -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();
Expand Down
6 changes: 3 additions & 3 deletions test/dom/components.browser.mocha.js
Original file line number Diff line number Diff line change
@@ -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();
Expand Down
8 changes: 4 additions & 4 deletions test/dom/components.mocha.js
Original file line number Diff line number Diff line change
@@ -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();
Expand Down
4 changes: 2 additions & 2 deletions test/dom/dom-events.mocha.js
Original file line number Diff line number Diff line change
@@ -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();
Expand Down
2 changes: 1 addition & 1 deletion test/dom/domTestRunner.mocha.js
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down
7 changes: 3 additions & 4 deletions test/dom/forms.browser.mocha.js
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down

0 comments on commit 3e983b7

Please sign in to comment.