Skip to content

Commit 043e9b6

Browse files
committed
Update test to exclude path separator
1 parent cabebde commit 043e9b6

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

tests/__tests__/import.spec.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { } from 'jest';
22
import { } from 'node';
3-
import * as path from 'path';
3+
import * as path from 'path';
44
import runJest from '../__helpers__/runJest';
55

66
describe('import with relative and absolute paths', () => {
@@ -15,16 +15,16 @@ describe('import with relative and absolute paths', () => {
1515
expect(result.status).toBe(1);
1616
expect(output).toContain('4 failed, 4 total');
1717

18-
expect(stderr).toContain('at new Hello (src' + path.sep + 'classes' + path.sep + 'Hello.ts:11:11)');
18+
expect(stderr).toContain('Hello.ts:11:11)');
1919

20-
expect(stderr).toContain('at Object.<anonymous> (__tests__' + path.sep + 'classes' + path.sep + 'Hello.test.ts:9:19)');
21-
expect(stderr).toContain('at Object.<anonymous> (__tests__' + path.sep + 'classes' + path.sep + 'Hello-relative.test.ts:9:19)');
20+
expect(stderr).toContain('Hello.test.ts:9:19)');
21+
expect(stderr).toContain('Hello-relative.test.ts:9:19)');
2222

23-
expect(stderr).toContain('at Object.simpleFunction (src' + path.sep + 'absolute-import.ts:4:17)');
24-
expect(stderr).toContain('at Object.<anonymous> (__tests__' + path.sep + 'absolute-import.test.ts:8:9)');
23+
expect(stderr).toContain('absolute-import.ts:4:17)');
24+
expect(stderr).toContain('absolute-import.test.ts:8:9)');
2525

26-
expect(stderr).toContain('at Object.simpleFunction (src' + path.sep + 'relative-import.ts:4:17)');
27-
expect(stderr).toContain('at Object.<anonymous> (__tests__' + path.sep + 'relative-import.test.ts:8:9)');
26+
expect(stderr).toContain('relative-import.ts:4:17)');
27+
expect(stderr).toContain('relative-import.test.ts:8:9)');
2828
});
2929

30-
});
30+
});

0 commit comments

Comments
 (0)