Skip to content

Commit dbfd4d8

Browse files
committed
commit large test suites
1 parent 1332309 commit dbfd4d8

File tree

1,518 files changed

+4665
-111
lines changed

Some content is hidden

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

1,518 files changed

+4665
-111
lines changed

.gitignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,3 @@ test-profiles
1616
coverage
1717
.vitest-reports
1818
*.DS_Store
19-
20-
# in a real app you'd want to not commit the .env
21-
# file as well, but since this is for a workshop
22-
# we're going to keep them around.
23-
# .env

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
**/public/**
66
**/package-lock.json
77
**/playwright-report/**
8+
**/.github/workflows/ci.yml

epicshop/generate-tests.js

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ async function generateTests(exerciseDirectory, count) {
2020

2121
await Promise.all(
2222
Array.from({ length: count }).map((_, index) => {
23-
const filename = `./test-${index.toString().padStart(count.toString().length, '0')}.test.ts`
23+
const realIndex = index + 1
24+
const filename = `./test-${realIndex.toString().padStart(count.toString().length, '0')}.test.ts`
2425
const contents = `\
25-
test('equals to ${index}', ({ expect }) => {
26-
expect(${index}).toBe(${index})
26+
test('equals to ${realIndex}', ({ expect }) => {
27+
expect(${realIndex}).toBe(${realIndex})
2728
})
2829
`
2930

@@ -51,6 +52,20 @@ Promise.all([
5152
),
5253
TEST_COUNT,
5354
),
55+
generateTests(
56+
new URL(
57+
'../exercises/04.performance/04.problem.sharding/',
58+
import.meta.url,
59+
),
60+
TEST_COUNT,
61+
),
62+
generateTests(
63+
new URL(
64+
'../exercises/04.performance/04.solution.sharding/',
65+
import.meta.url,
66+
),
67+
TEST_COUNT,
68+
),
5469
]).catch((error) => {
5570
console.error('❌ Failed to generate tests.\n\n', error)
5671
process.exit(1)

exercises/04.performance/03.solution.test-isolation/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
test('equals to 1', ({ expect }) => {
2+
expect(1).toBe(1)
3+
})
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
test('equals to 2', ({ expect }) => {
2+
expect(2).toBe(2)
3+
})
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
test('equals to 3', ({ expect }) => {
2+
expect(3).toBe(3)
3+
})
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
test('equals to 4', ({ expect }) => {
2+
expect(4).toBe(4)
3+
})
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
test('equals to 5', ({ expect }) => {
2+
expect(5).toBe(5)
3+
})
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
test('equals to 6', ({ expect }) => {
2+
expect(6).toBe(6)
3+
})

0 commit comments

Comments
 (0)