Skip to content

Commit

Permalink
fix: now using jest-transform-svelte (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
benmonro authored May 3, 2019
1 parent f178ebb commit 8437fc5
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 51 deletions.
12 changes: 6 additions & 6 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
const { jest: jestConfig } = require('kcd-scripts/config');
const {jest: jestConfig} = require('kcd-scripts/config')

const config = Object.assign(jestConfig, {
roots: ['tests'],
testMatch: ['/**/*.spec.js'],
transform: {
...jestConfig.transform,
'\\.svelte$': './tests/transform'
'^.+\\.svelte$': 'jest-transform-svelte',
},
transformIgnorePatterns: [
...jestConfig.transformIgnorePatterns,
'/node_modules/(?!svelte).+\\.js$'
'/node_modules/(?!svelte).+\\.js$',
],
moduleFileExtensions: [...jestConfig.moduleFileExtensions, 'svelte']
});
module.exports = config;
moduleFileExtensions: [...jestConfig.moduleFileExtensions, 'svelte'],
})
module.exports = config
40 changes: 32 additions & 8 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"esm": "^3.2.22",
"jest": "^24.7.1",
"jest-dom": "^3.1.2",
"jest-transform-svelte": "^1.0.0",
"kcd-scripts": "^1.2.1",
"npm-run-all": "^4.1.5",
"rollup": "^1.10.1",
Expand All @@ -17,8 +18,7 @@
"rollup-plugin-svelte": "^5.0.3",
"rollup-plugin-terser": "^4.0.4",
"sirv-cli": "^0.4.0",
"svelte": "^3.0.0",
"svelte-jest": "^0.2.0"
"svelte": "^3.0.0"
},
"peerDependencies": {
"svelte": "3.x"
Expand Down
22 changes: 0 additions & 22 deletions tests/compile.js

This file was deleted.

13 changes: 0 additions & 13 deletions tests/transform.js

This file was deleted.

0 comments on commit 8437fc5

Please sign in to comment.