Skip to content

Commit b6e01c8

Browse files
committed
fix
1 parent cd107ed commit b6e01c8

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
],
6262
"scripts": {
6363
"lint": "prettier --check .",
64-
"lint-fix": "prettier --write .",
64+
"lint-fix": "prettier --loglevel warn --write .",
6565
"clean": "rimraf dist tsconfig.schema.json tsconfig.schemastore-schema.json tsconfig.tsbuildinfo tests/ts-node-packed.tgz",
6666
"rebuild": "npm run clean && npm run build",
6767
"build": "npm run build-nopack && npm run build-pack",

src/test/repl/repl-environment.spec.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ test.suite(
137137

138138
/** Every possible ./node_modules directory ascending upwards starting with ./tests/node_modules */
139139
const modulePaths = createModulePaths(TEST_DIR);
140-
const rootModulePaths = createModulePaths(ROOT_DIR);
141140
function createModulePaths(dir: string) {
142141
const modulePaths: string[] = [];
143142
for (let path = dir; ; path = dirname(path)) {
@@ -430,7 +429,7 @@ test.suite(
430429

431430
// Note: vanilla node uses different name. See #1360
432431
stackTest: expect.stringContaining(
433-
` at ${join(ROOT_DIR, '<repl>.ts')}:1:`
432+
` at ${join(TEST_DIR, '<repl>.ts')}:1:`
434433
),
435434
},
436435
});
@@ -455,13 +454,13 @@ test.suite(
455454
modulePath: '.',
456455
moduleFilename: null,
457456
modulePaths: expect.objectContaining({
458-
...[join(ROOT_DIR, `repl/node_modules`), ...rootModulePaths],
457+
...[join(TEST_DIR, `repl/node_modules`), ...modulePaths],
459458
}),
460459
// Note: vanilla node REPL does not set exports
461460
exportsTest: true,
462461
// Note: vanilla node uses different name. See #1360
463462
stackTest: expect.stringContaining(
464-
` at ${join(ROOT_DIR, '<repl>.ts')}:1:`
463+
` at ${join(TEST_DIR, '<repl>.ts')}:1:`
465464
),
466465
moduleAccessorsTest: true,
467466
},

src/test/repl/repl.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,13 +246,13 @@ test.suite('top level await', (_test) => {
246246
'should error with typing information when importing a file with type errors',
247247
async (t) => {
248248
const { stdout, stderr } = await t.context.executeInTlaRepl(
249-
`const {foo} = await import('./tests/repl/tla-import');`,
249+
`const {foo} = await import('./repl/tla-import');`,
250250
'error'
251251
);
252252

253253
expect(stdout).toBe('> > ');
254254
expect(stderr.replace(/\r\n/g, '\n')).toBe(
255-
'tests/repl/tla-import.ts(1,14): error TS2322: ' +
255+
'repl/tla-import.ts(1,14): error TS2322: ' +
256256
(semver.gte(ts.version, '4.0.0')
257257
? `Type 'number' is not assignable to type 'string'.\n`
258258
: `Type '1' is not assignable to type 'string'.\n`) +

0 commit comments

Comments
 (0)