Skip to content

Commit 927c972

Browse files
Simplify
1 parent 43917f9 commit 927c972

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"test:bundler:rollup": "cd test/rollup && npm install && npm test",
4040
"test:bundler:webpack": "cd test/webpack && npm install && npm test",
4141
"test:types": "tsc -p ./test/types/tsconfig.json",
42-
"test:unit": "node --experimental-import-meta-resolve node_modules/jasmine/bin/jasmine.js --config=test/unit/jasmine.json",
42+
"test:unit": "jasmine --config=test/unit/jasmine.json",
4343
"lint": "eslint \"*.mjs\" \"src/**/*.ts\"",
4444
"build": "npm run build:bundle && npm run build:types",
4545
"build:bundle": "rollup -c",

test/unit/import.spec.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ function testPolyfill(id, expectedId) {
3939
afterEach(() => {
4040
global.ReadableStream = oldGlobalReadableStream;
4141
});
42-
it(`resolves to ${expectedId}`, async () => {
43-
await testResolve(id, expectedId);
42+
it(`resolves to ${expectedId}`, () => {
43+
testResolve(id, expectedId);
4444
});
4545
// FIXME Remove from import() cache first somehow?
4646
// it('loads correctly', async () => {
@@ -50,7 +50,7 @@ function testPolyfill(id, expectedId) {
5050
// });
5151
}
5252

53-
async function testResolve(id, expectedId) {
54-
const resolved = (await import.meta.resolve(id)).toString();
53+
function testResolve(id, expectedId) {
54+
const resolved = import.meta.resolve(id);
5555
expect(resolved.endsWith(expectedId)).toBeTrue();
5656
}

test/unit/require.spec.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ function testPolyfill(id, expectedId) {
5353

5454
function requireUncached(module) {
5555
delete require.cache[require.resolve(module)];
56-
// eslint-disable-next-line global-require
56+
// eslint-disable-next-line @typescript-eslint/no-require-imports
5757
return require(module);
5858
}

0 commit comments

Comments
 (0)