Skip to content

Commit 37a0187

Browse files
committed
perf: faster tests
1 parent 8dcafca commit 37a0187

6 files changed

Lines changed: 228 additions & 253 deletions

File tree

e2e/__cases__/source-maps/echo.spec.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

e2e/__cases__/source-maps/echo.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { consoleLog, throwError } from './main';
2+
3+
describe('console.log()', () => {
4+
test('from sources', () => {
5+
consoleLog();
6+
expect(true).toBe(true);
7+
});
8+
test('from tests', () => {
9+
console.log('WITHIN TEST');
10+
expect(true).toBe(true);
11+
});
12+
});
13+
14+
describe('throw new Error()', () => {
15+
test('throws from sources', () => {
16+
throwError();
17+
expect(true).toBe(true);
18+
});
19+
test('throws from tests', () => {
20+
throw new Error('WITHIN TEST');
21+
expect(true).toBe(true);
22+
});
23+
});

e2e/__cases__/source-maps/main.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export function consoleLog() {
2+
console.log('WITHIN SOURCE');
3+
}
4+
5+
export function throwError() {
6+
throw new Error('WITHIN SOURCE');
7+
}

0 commit comments

Comments
 (0)