Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: start tests with ui on stackblitz #520

Merged
merged 1 commit into from
Jan 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
| Example | Source | Playground |
|---|---|---|
| `basic` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/basic) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/basic?terminal=test) |
| `lit` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/lit) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/lit?terminal=test) |
| `mocks` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/mocks) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/mocks?terminal=test) |
| `puppeteer` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/puppeteer) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/puppeteer?terminal=test) |
| `react` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/react) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/react?terminal=test) |
| `react-enzyme` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/react-enzyme) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/react-enzyme?terminal=test) |
| `react-mui` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/react-mui) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/react-mui?terminal=test) |
| `react-storybook-testing` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/react-storybook-testing) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/react-storybook-testing?terminal=test) |
| `react-testing-lib` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/react-testing-lib) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/react-testing-lib?terminal=test) |
| `react-testing-lib-msw` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/react-testing-lib-msw) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/react-testing-lib-msw?terminal=test) |
| `basic` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/basic) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/basic?terminal=test:ui) |
| `lit` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/lit) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/lit?terminal=test:ui) |
| `mocks` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/mocks) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/mocks?terminal=test:ui) |
| `puppeteer` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/puppeteer) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/puppeteer?terminal=test:ui) |
| `react` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/react) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/react?terminal=test:ui) |
| `react-enzyme` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/react-enzyme) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/react-enzyme?terminal=test:ui) |
| `react-mui` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/react-mui) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/react-mui?terminal=test:ui) |
| `react-storybook-testing` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/react-storybook-testing) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/react-storybook-testing?terminal=test:ui) |
| `react-testing-lib` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/react-testing-lib) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/react-testing-lib?terminal=test:ui) |
| `react-testing-lib-msw` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/react-testing-lib-msw) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/react-testing-lib-msw?terminal=test:ui) |
| `ruby` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/ruby) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/ruby?terminal=test) |
| `solid` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/solid) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/solid?terminal=test) |
| `svelte` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/svelte) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/svelte?terminal=test) |
| `testing-library-jest-dom` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/testing-library-jest-dom) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/testing-library-jest-dom?terminal=test) |
| `svelte` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/svelte) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/svelte?terminal=test:ui) |
| `vitesse` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/vitesse) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/vitesse?terminal=test) |
| `vue` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/vue) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/vue?terminal=test) |
| `vue-jsx` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/vue-jsx) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/vue-jsx?terminal=test) |
Expand Down
3 changes: 2 additions & 1 deletion examples/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"license": "MIT",
"type": "module",
"scripts": {
"test": "vitest --ui",
"test": "vitest",
"test:ui": "vitest --ui",
"test:run": "vitest run"
},
"devDependencies": {
Expand Down
4 changes: 3 additions & 1 deletion examples/lit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
"scripts": {
"coverage": "vitest --coverage",
"dev": "vite",
"test": "vitest"
"test": "vitest",
"test:ui": "vitest --ui"
},
"dependencies": {
"lit": "^2.1.1"
},
"devDependencies": {
"@vitest/ui": "latest",
"happy-dom": "*",
"vite": "^2.7.10",
"vitest": "latest"
Expand Down
4 changes: 3 additions & 1 deletion examples/mocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@
"scripts": {
"coverage": "vitest --coverage",
"dev": "vite",
"test": "vitest"
"test": "vitest",
"test:ui": "vitest --ui"
},
"dependencies": {
"@vueuse/integrations": "^7.5.3",
"axios": "^0.24.0",
"tinyspy": "^0.2.8"
},
"devDependencies": {
"@vitest/ui": "latest",
"vite": "^2.7.10",
"vitest": "latest"
}
Expand Down
4 changes: 3 additions & 1 deletion examples/puppeteer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
"scripts": {
"build": "vite build",
"coverage": "vitest --coverage",
"test": "vite build && vitest"
"test": "vite build && vitest",
"test:ui": "vite build && vitest --ui"
},
"devDependencies": {
"@vitest/ui": "latest",
"puppeteer": "^13.0.0",
"vite": "^2.7.10",
"vitest": "latest"
Expand Down
4 changes: 3 additions & 1 deletion examples/react-enzyme/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "@vitest/test-react",
"scripts": {
"test": "vitest"
"test": "vitest",
"test:ui": "vitest --ui"
},
"dependencies": {
"react": "^17.0.2",
Expand All @@ -11,6 +12,7 @@
"@types/react": "^17.0.38",
"@types/react-dom": "^17.0.11",
"@vitejs/plugin-react": "1.1.4",
"@vitest/ui": "latest",
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.6",
"vite": "2.7.10",
Expand Down
2 changes: 2 additions & 0 deletions examples/react-mui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "index.js",
"scripts": {
"test": "vitest",
"test:ui": "vitest --ui",
"test:run": "vitest run"
},
"dependencies": {
Expand All @@ -24,6 +25,7 @@
"@testing-library/jest-dom": "^5.16.1",
"@testing-library/react": "^12.1.2",
"@testing-library/user-event": "^13.5.0",
"@vitest/ui": "latest",
"date-fns": "^2.28.0",
"jsdom": "^19.0.0",
"vite": "^2.7.10",
Expand Down
2 changes: 2 additions & 0 deletions examples/react-storybook-testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"build": "tsc && vite build",
"preview": "vite preview",
"test": "vitest",
"test:ui": "vitest --ui",
"storybook": "start-storybook -p 6006"
},
"dependencies": {
Expand All @@ -27,6 +28,7 @@
"@types/react": "^17.0.33",
"@types/react-dom": "^17.0.10",
"@vitejs/plugin-react": "^1.0.7",
"@vitest/ui": "latest",
"babel-loader": "^8.2.3",
"jsdom": "^19.0.0",
"msw": "^0.36.3",
Expand Down
4 changes: 3 additions & 1 deletion examples/react-testing-lib-msw/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"coverage": "vitest --coverage",
"dev": "vite",
"preview": "vite preview",
"test": "vitest"
"test": "vitest",
"test:ui": "vitest --ui"
},
"dependencies": {
"react": "^17.0.2",
Expand All @@ -18,6 +19,7 @@
"@types/react": "^17.0.38",
"@types/react-dom": "^17.0.11",
"@vitejs/plugin-react": "^1.1.4",
"@vitest/ui": "latest",
"cross-fetch": "^3.1.4",
"jsdom": "^19.0.0",
"msw": "^0.36.3",
Expand Down
4 changes: 3 additions & 1 deletion examples/react-testing-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"coverage": "vitest --coverage",
"dev": "vite",
"preview": "vite preview",
"test": "vitest"
"test": "vitest",
"test:ui": "vitest --ui"
},
"dependencies": {
"react": "^17.0.2",
Expand All @@ -20,6 +21,7 @@
"@types/react": "^17.0.38",
"@types/react-dom": "^17.0.11",
"@vitejs/plugin-react": "^1.1.4",
"@vitest/ui": "latest",
"jsdom": "^19.0.0",
"vite": "^2.7.10",
"vitest": "latest"
Expand Down
4 changes: 3 additions & 1 deletion examples/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"private": true,
"scripts": {
"coverage": "vitest --coverage",
"test": "vitest"
"test": "vitest",
"test:ui": "vitest --ui"
},
"dependencies": {
"react": "^17.0.2"
Expand All @@ -12,6 +13,7 @@
"@types/react": "^17.0.38",
"@types/react-test-renderer": "^17.0.1",
"@vitejs/plugin-react": "1.1.4",
"@vitest/ui": "latest",
"happy-dom": "^2.25.2",
"jsdom": "*",
"react-test-renderer": "17.0.2",
Expand Down
2 changes: 2 additions & 0 deletions examples/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
"type": "module",
"scripts": {
"test": "vitest",
"test:ui": "vitest --ui",
"coverage": "vitest --coverage"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^1.0.0-next.34",
"@testing-library/svelte": "^3.0.3",
"@vitest/ui": "latest",
"jsdom": "^19.0.0",
"svelte": "^3.45.0",
"vitest": "latest"
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"docs": "npm -C docs run dev",
"docs:build": "npm -C docs run build",
"docs:serve": "npm -C docs run serve",
"docs:examples": "esno scripts/update-examples.ts",
"postinstall": "pnpm -C examples/vue2 i",
"lint": "eslint --ext .js,.vue,.ts,.tsx .",
"lint:fix": "eslint --ext .js,.vue,.ts,.tsx . --fix",
Expand Down
23 changes: 23 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading