Skip to content

Commit 7cac487

Browse files
committed
add placeholder tests
1 parent 074d8f4 commit 7cac487

File tree

97 files changed

+1150
-31
lines changed

Some content is hidden

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

97 files changed

+1150
-31
lines changed

exercises/02.server-components/01.problem.rsc/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"description": "Super simple implementation of RSCs with minimal deps",
77
"main": "index.js",
88
"scripts": {
9-
"dev": "node --watch server/app.js"
9+
"dev": "node --watch server/app.js",
10+
"test": "playwright test --config=./tests/playwright.config.js"
1011
},
1112
"keywords": [],
1213
"author": "Kent C. Dodds <[email protected]> (https://kentcdodds.com/)",
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { defineConfig, devices } from '@playwright/test'
2+
3+
const PORT = process.env.PORT || '3000'
4+
5+
export default defineConfig({
6+
reporter: [['html', { open: 'never' }]],
7+
use: {
8+
baseURL: `http://localhost:${PORT}/`,
9+
trace: 'retain-on-failure',
10+
},
11+
12+
projects: [
13+
{
14+
name: 'chromium',
15+
use: { ...devices['Desktop Chrome'] },
16+
},
17+
],
18+
19+
webServer: {
20+
command: process.env.CI ? 'npm run start' : 'npm run dev',
21+
port: Number(PORT),
22+
reuseExistingServer: !process.env.CI,
23+
stdout: 'pipe',
24+
stderr: 'pipe',
25+
env: { PORT },
26+
},
27+
})
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { test, expect } from '@playwright/test'
2+
3+
test('TODO: write an appropriate test for this exercise', async ({ page }) => {
4+
await page.goto('/')
5+
expect(true).toBe(true)
6+
// TODO: write a test for this exercise
7+
})

exercises/02.server-components/01.solution.rsc/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"description": "Super simple implementation of RSCs with minimal deps",
77
"main": "index.js",
88
"scripts": {
9-
"dev": "node --conditions=react-server --watch server/app.js"
9+
"dev": "node --conditions=react-server --watch server/app.js",
10+
"test": "playwright test --config=./tests/playwright.config.js"
1011
},
1112
"keywords": [],
1213
"author": "Kent C. Dodds <[email protected]> (https://kentcdodds.com/)",
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { defineConfig, devices } from '@playwright/test'
2+
3+
const PORT = process.env.PORT || '3000'
4+
5+
export default defineConfig({
6+
reporter: [['html', { open: 'never' }]],
7+
use: {
8+
baseURL: `http://localhost:${PORT}/`,
9+
trace: 'retain-on-failure',
10+
},
11+
12+
projects: [
13+
{
14+
name: 'chromium',
15+
use: { ...devices['Desktop Chrome'] },
16+
},
17+
],
18+
19+
webServer: {
20+
command: process.env.CI ? 'npm run start' : 'npm run dev',
21+
port: Number(PORT),
22+
reuseExistingServer: !process.env.CI,
23+
stdout: 'pipe',
24+
stderr: 'pipe',
25+
env: { PORT },
26+
},
27+
})
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { test, expect } from '@playwright/test'
2+
3+
test('TODO: write an appropriate test for this exercise', async ({ page }) => {
4+
await page.goto('/')
5+
expect(true).toBe(true)
6+
// TODO: write a test for this exercise
7+
})

exercises/02.server-components/02.problem.async-components/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"description": "Super simple implementation of RSCs with minimal deps",
77
"main": "index.js",
88
"scripts": {
9-
"dev": "node --conditions=react-server --watch server/app.js"
9+
"dev": "node --conditions=react-server --watch server/app.js",
10+
"test": "playwright test --config=./tests/playwright.config.js"
1011
},
1112
"keywords": [],
1213
"author": "Kent C. Dodds <[email protected]> (https://kentcdodds.com/)",
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { defineConfig, devices } from '@playwright/test'
2+
3+
const PORT = process.env.PORT || '3000'
4+
5+
export default defineConfig({
6+
reporter: [['html', { open: 'never' }]],
7+
use: {
8+
baseURL: `http://localhost:${PORT}/`,
9+
trace: 'retain-on-failure',
10+
},
11+
12+
projects: [
13+
{
14+
name: 'chromium',
15+
use: { ...devices['Desktop Chrome'] },
16+
},
17+
],
18+
19+
webServer: {
20+
command: process.env.CI ? 'npm run start' : 'npm run dev',
21+
port: Number(PORT),
22+
reuseExistingServer: !process.env.CI,
23+
stdout: 'pipe',
24+
stderr: 'pipe',
25+
env: { PORT },
26+
},
27+
})

0 commit comments

Comments
 (0)