Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.

Commit 9d77327

Browse files
committed
test: refactor to resolve from cwd
1 parent e87eb26 commit 9d77327

File tree

3 files changed

+4
-37
lines changed

3 files changed

+4
-37
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
"fs-fixture": "^1.2.0",
4848
"get-node": "^14.2.1",
4949
"manten": "^1.1.0",
50-
"outdent": "^0.8.0",
5150
"pkgroll": "^1.11.0",
5251
"semver": "^7.5.4",
5352
"source-map-support": "^0.5.21",

pnpm-lock.yaml

Lines changed: 0 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/specs/json.ts

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { testSuite, expect } from 'manten';
22
import { createFixture } from 'fs-fixture';
3-
import { outdent } from 'outdent';
43
import type { NodeApis } from '../utils/node-with-loader.js';
54

65
const jsonFixture = {
@@ -27,13 +26,7 @@ export default testSuite(async ({ describe }, node: NodeApis) => {
2726

2827
test('Import', async () => {
2928
const nodeProcess = await node.importFile(fixture.path, './index.json');
30-
expect(nodeProcess.stdout).toMatch(
31-
outdent`
32-
[Module: null prototype] {
33-
default: { loaded: 'json' },
34-
loaded: 'json'
35-
}`,
36-
);
29+
expect(nodeProcess.stdout).toMatch('default: { loaded: \'json\' }');
3730
});
3831
});
3932

@@ -46,13 +39,7 @@ export default testSuite(async ({ describe }, node: NodeApis) => {
4639

4740
test('Import', async () => {
4841
const nodeProcess = await node.importFile(fixture.path, './index');
49-
expect(nodeProcess.stdout).toMatch(
50-
outdent`
51-
[Module: null prototype] {
52-
default: { loaded: 'json' },
53-
loaded: 'json'
54-
}`,
55-
);
42+
expect(nodeProcess.stdout).toMatch('default: { loaded: \'json\' }');
5643
});
5744
});
5845

@@ -68,13 +55,7 @@ export default testSuite(async ({ describe }, node: NodeApis) => {
6855

6956
test('Import', async () => {
7057
const nodeProcess = await node.importFile(fixture.path, '.');
71-
expect(nodeProcess.stdout).toMatch(
72-
outdent`
73-
[Module: null prototype] {
74-
default: { loaded: 'json' },
75-
loaded: 'json'
76-
}`,
77-
);
58+
expect(nodeProcess.stdout).toMatch('default: { loaded: \'json\' }');
7859
});
7960
});
8061

@@ -97,13 +78,7 @@ export default testSuite(async ({ describe }, node: NodeApis) => {
9778

9879
test('Import', async () => {
9980
const nodeProcess = await node.importFile(fixture.path, './index');
100-
expect(nodeProcess.stdout).toMatch(
101-
outdent`
102-
[Module: null prototype] {
103-
default: { loaded: 'json' },
104-
loaded: 'json'
105-
}`,
106-
);
81+
expect(nodeProcess.stdout).toMatch('default: { loaded: \'json\' }');
10782
});
10883
});
10984

0 commit comments

Comments
 (0)