Skip to content

Commit f8435a4

Browse files
authored
refactor: move tests from playground to e2e-tests, remove some playground (#65)
* refactor: move tests from playground to e2e-tests, remove playgrounds based on default svelte template * fix: update lockfile * fix: update build scripts to only build vite-plugin-svelte
1 parent c3f65fd commit f8435a4

File tree

140 files changed

+125
-645
lines changed

Some content is hidden

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

140 files changed

+125
-645
lines changed

.changeset/pre.json

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,20 @@
44
"initialVersions": {
55
"vite-plugin-svelte-playground": "1.0.0",
66
"playground-big": "0.0.0",
7-
"playground-default-svelte-template": "1.0.0",
8-
"playground-default-svelte-template-ts": "1.0.0",
9-
"playground-hmr": "0.0.0",
10-
"playground-hmr-test-dependency": "1.0.0",
7+
"e2e-tests-hmr": "0.0.0",
8+
"e2e-tests-hmr-test-dependency": "1.0.0",
119
"playground-preprocess-with-vite": "0.0.0",
1210
"playground-vite-ssr": "0.0.0",
1311
"playground-windicss": "0.0.0",
1412
"@sveltejs/vite-plugin-svelte": "1.0.0-next.4",
15-
"playground-autoprefixer-browserslist": "1.0.0",
16-
"playground-kit-node": "0.0.0",
17-
"playground-ts-type-import": "0.0.0",
18-
"playground-configfile-custom": "1.0.0",
19-
"playground-configfile-esm": "1.0.0",
20-
"playground-svelte-preprocess": "0.0.0",
21-
"playground-package-json-svelte-field": "1.0.0",
22-
"playground-test-dependency-svelte-field": "1.0.0"
13+
"e2e-tests-autoprefixer-browserslist": "1.0.0",
14+
"e2e-tests-kit-node": "0.0.0",
15+
"e2e-tests-ts-type-import": "0.0.0",
16+
"e2e-tests-configfile-custom": "1.0.0",
17+
"e2e-tests-configfile-esm": "1.0.0",
18+
"e2e-tests-svelte-preprocess": "0.0.0",
19+
"e2e-tests-package-json-svelte-field": "1.0.0",
20+
"e2e-tests-test-dependency-svelte-field": "1.0.0"
2321
},
2422
"changesets": [
2523
"blue-schools-bake",

.eslintrc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ module.exports = {
5959
},
6060
overrides: [
6161
{
62-
files: ['packages/playground/**'],
62+
files: ['packages/e2e-tests/**', 'packages/playground/**'],
6363
rules: {
6464
'node/no-extraneous-import': 'off',
6565
'node/no-extraneous-require': 'off',
@@ -70,7 +70,7 @@ module.exports = {
7070
}
7171
},
7272
{
73-
files: ['packages/playground/**/vite.config.js'],
73+
files: ['packages/e2e-tests/**/vite.config.js', 'packages/playground/**'],
7474
rules: {
7575
'no-unused-vars': 'off',
7676
'node/no-missing-require': 'off'

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion

jest.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const isCI = !!process.env.CI;
44
module.exports = {
55
preset: 'ts-jest',
66
testMatch: process.env.VITE_TEST_BUILD
7-
? ['**/playground/**/*.spec.[jt]s?(x)']
7+
? ['**/e2e-tests/**/*.spec.[jt]s?(x)']
88
: ['**/*.spec.[jt]s?(x)'],
99
testTimeout: isCI ? (isWin ? 45000 : 30000) : 10000,
1010
globalSetup: './scripts/jestGlobalSetup.js',
@@ -14,11 +14,11 @@ module.exports = {
1414
watchPathIgnorePatterns: ['<rootDir>/temp'],
1515
modulePathIgnorePatterns: ['<rootDir>/temp'],
1616
moduleNameMapper: {
17-
testUtils: '<rootDir>/packages/playground/testUtils.ts'
17+
testUtils: '<rootDir>/packages/e2e-tests/testUtils.ts'
1818
},
1919
globals: {
2020
'ts-jest': {
21-
tsconfig: './packages/playground/tsconfig.json'
21+
tsconfig: './packages/e2e-tests/tsconfig.json'
2222
}
2323
},
2424
reporters: [

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
"private": true,
44
"scripts": {
55
"dev": "pnpm --dir packages/vite-plugin-svelte dev",
6-
"build:ci": "pnpm -r build:ci --filter=./packages/vite-plugin-svelte",
7-
"build": "pnpm -r build --filter=\\!./packages/playground",
8-
"build:vite-plugin-svelte": "pnpm --dir packages/vite-plugin-svelte build",
6+
"build:ci": "pnpm --dir packages/vite-plugin-svelte build:ci",
7+
"build": "pnpm --dir packages/vite-plugin-svelte build",
98
"test": "run-s test:serve test:build",
109
"test:serve": "jest",
1110
"test:serve:debug": "cross-env VITE_DEBUG_SERVE=1 node --inspect-brk ./node_modules/.bin/jest",

packages/e2e-tests/README.md

Lines changed: 1 addition & 0 deletions

0 commit comments

Comments
 (0)