Skip to content

Commit

Permalink
feat: add test dependencies, setup and scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianrothe committed Jun 14, 2024
1 parent b7a54cb commit 71076e5
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 1,532 deletions.
8 changes: 6 additions & 2 deletions e2e/init-svelte-4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ npm init vite
# select svelte, js and name "svelte-4"
cd svelte-4

npm install
pnpm install

# install test dependencies
npm install --save-dev svelte-preprocess jest jest-environment-jsdom svelte-jester @babel/preset-env babel-jest @testing-library/svelte@4 @testing-library/jest-dom
pnpm install --save-dev svelte-preprocess jest jest-environment-jsdom svelte-jester@workspace @testing-library/svelte@4 @testing-library/jest-dom
# apply all steps from https://github.com/rossyman/svelte-add-jest/blob/main/preset.ts

# add svg transformer
pnpm i -D jest-svg-transformer@https://github.com/Em-Ant/jest-transformer-svg
# add transform config to package.json `"^.+\\.svg$": "jest-svg-transformer"`

cd ..
1 change: 1 addition & 0 deletions e2e/svelte-4/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shell-emulator=true
Loading

0 comments on commit 71076e5

Please sign in to comment.