Skip to content

Commit 0f16dc2

Browse files
committed
fix test
1 parent 8408336 commit 0f16dc2

File tree

119 files changed

+127
-129
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+127
-129
lines changed

modules/10-basics/10-hello-world/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ test('hello world', async () => {
66
const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => { });
77
await import('./index.js')
88

9-
const firstArg = consoleLogSpy.mock.calls[0]?.[0];
9+
const firstArg = consoleLogSpy.mock.calls.join('\n');
1010

1111
expect(firstArg).toBe('Hello, World!')
1212
})
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
test:
2-
@ test-output.sh
2+
@ test2.sh
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
test:
2-
@ test-output.sh
2+
@ test2.sh

modules/10-basics/40-instructions/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ test('hello world', async () => {
66
const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => { });
77
await import('./index.js')
88

9-
const firstArg = consoleLogSpy.mock.calls[0]?.[0];
9+
const firstArg = consoleLogSpy.mock.calls.join('\n');
1010

1111
expect(firstArg).toBe('Robert\nStannis\nRenly')
1212
})

modules/10-basics/45-testing/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
test:
2-
@ test-output.sh
2+
@ test2.sh

modules/10-basics/45-testing/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ test('hello world', async () => {
66
const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => { });
77
await import('./index.js')
88

9-
const firstArg = consoleLogSpy.mock.calls[0]?.[0];
9+
const firstArg = consoleLogSpy.mock.calls.join('\n');
1010

1111
expect(firstArg).toBe('9780262531962')
1212
})
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
test:
2-
@ test-output.sh
2+
@ test2.sh

modules/10-basics/50-syntax-errors/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ test('hello world', async () => {
66
const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => { });
77
await import('./index.js')
88

9-
const firstArg = consoleLogSpy.mock.calls[0]?.[0];
9+
const firstArg = consoleLogSpy.mock.calls.join('\n');
1010

1111
expect(firstArg).toBe('What Is Dead May Never Die')
1212
})
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
test:
2-
@ test-output.sh
2+
@ test2.sh

modules/20-arithmetics/20-basic/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ test('hello world', async () => {
66
const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => { });
77
await import('./index.js')
88

9-
const firstArg = consoleLogSpy.mock.calls[0]?.[0];
9+
const firstArg = consoleLogSpy.mock.calls.join('\n');
1010

1111
expect(firstArg).toBe('9')
1212
})

0 commit comments

Comments
 (0)