Skip to content

Commit a891069

Browse files
committed
tests: rename .mjs files to .js
The package is ESM now
1 parent 8fd9696 commit a891069

10 files changed

Lines changed: 9 additions & 9 deletions

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"check:types": "npm run generate:types && git diff HEAD --exit-code types/index.d.ts",
2424
"lint": "xo",
2525
"fix": "xo --fix",
26-
"mocha": "mocha \"test/*.test.mjs\"",
26+
"mocha": "mocha \"test/*.test.js\"",
2727
"test": "npm run lint && npm run check:types && npm run mocha",
2828
"test:ci": "c8 npm run mocha"
2929
},
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import os from 'node:os';
55
import path from 'node:path';
66
import process from 'node:process';
77
import { fileURLToPath } from 'node:url';
8-
import { fixtures } from './helpers.mjs';
8+
import { fixtures } from './helpers.js';
99

1010
const cliPath = fileURLToPath(new URL('../bin/cli.js', import.meta.url));
1111

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { strict as assert } from 'node:assert';
22
import path from 'node:path';
33
import Config from '../lib/config.js';
44
import dependencyTree from '../index.js';
5-
import { fixtures } from './helpers.mjs';
5+
import { fixtures } from './helpers.js';
66

77
describe('Config', () => {
88
it('pre-parses tsconfig for performance', () => {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import mockfs from 'mock-fs';
66
import precinct from 'precinct';
77
import sinon from 'sinon';
88
import dependencyTree from '../index.js';
9-
import { fixtures } from './helpers.mjs';
9+
import { fixtures } from './helpers.js';
1010

1111
const { resolve } = createRequire(import.meta.url);
1212

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
mockSass,
1010
mockStylus,
1111
mockLess
12-
} from './helpers.mjs';
12+
} from './helpers.js';
1313

1414
function testTreesForFormat(format, ext = '.js') {
1515
it('returns an object form of the dependency tree for a file', () => {
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { strict as assert } from 'node:assert';
22
import path from 'node:path';
33
import mockfs from 'mock-fs';
44
import dependencyTree from '../index.js';
5-
import { fixtures } from './helpers.mjs';
5+
import { fixtures } from './helpers.js';
66

77
describe('package-specific node_modules resolution', () => {
88
afterEach(() => {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import path from 'node:path';
33
import process from 'node:process';
44
import mockfs from 'mock-fs';
55
import dependencyTree from '../index.js';
6-
import { fixtures, testDir } from './helpers.mjs';
6+
import { fixtures, testDir } from './helpers.js';
77

88
function assertResolvesToLodizzle(tree, entryFile) {
99
const filename = path.resolve(process.cwd(), entryFile);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
mockSass,
99
mockStylus,
1010
mockLess
11-
} from './helpers.mjs';
11+
} from './helpers.js';
1212

1313
function testToList(format, ext = '.js') {
1414
it('returns a post-order list form of the dependency tree', () => {

xo.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default [
5353
},
5454
{
5555
files: [
56-
'test/**/*.mjs'
56+
'test/**/*.js'
5757
],
5858
languageOptions: {
5959
globals: globals.mocha

0 commit comments

Comments
 (0)