Skip to content

Commit

Permalink
add validation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ankarhem committed Feb 9, 2022
1 parent 46b67de commit 89fa2dc
Show file tree
Hide file tree
Showing 7 changed files with 4,536 additions and 925 deletions.
3 changes: 3 additions & 0 deletions babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [['@babel/preset-env', { targets: { node: 'current' } }]]
};
1 change: 1 addition & 0 deletions jest-setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '@testing-library/jest-dom';
18 changes: 18 additions & 0 deletions jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
transform: {
'^.+\\.svelte$': ['svelte-jester', { preprocess: './svelte.config.js' }],
'^.+\\.ts$': 'ts-jest',
'^.+\\.js$': 'ts-jest'
},
moduleFileExtensions: ['js', 'ts', 'svelte'],
moduleNameMapper: {
'^\\$lib(.*)$': '<rootDir>/src/lib$1',
'^\\$app(.*)$': [
'<rootDir>/.svelte-kit/dev/runtime/app$1',
'<rootDir>/.svelte-kit/build/runtime/app$1'
]
},
setupFilesAfterEnv: ['<rootDir>/jest-setup.ts'],
collectCoverageFrom: ['src/**/*.{ts,tsx,svelte,js,jsx}'],
testEnvironment: 'jsdom'
};
14 changes: 13 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,42 @@
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --ignore-path .gitignore --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .",
"format": "prettier --ignore-path .gitignore --write --plugin-search-dir=. .",
"start": "node build/index.js"
"start": "node build/index.js",
"test": "jest",
"test:watch": "npm run test -- --watchAll",
"test:coverage": "jest --coverage"
},
"devDependencies": {
"@babel/core": ">=7.13.0 <8.0.0",
"@babel/preset-env": "^7.16.11",
"@sveltejs/adapter-auto": "next",
"@sveltejs/adapter-node": "^1.0.0-next.67",
"@sveltejs/kit": "next",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/svelte": "^3.0.3",
"@types/better-sqlite3": "^7.4.2",
"@types/jest": "^27.4.0",
"@typescript-eslint/eslint-plugin": "^4.31.1",
"@typescript-eslint/parser": "^4.31.1",
"autoprefixer": "^10.4.2",
"babel": "^6.23.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-svelte3": "^3.2.1",
"jest": "^27.5.1",
"postcss": "^8.4.5",
"prettier": "^2.4.1",
"prettier-plugin-svelte": "^2.4.0",
"prettier-plugin-tailwindcss": "^0.1.4",
"svelte": "^3.44.0",
"svelte-check": "^2.2.6",
"svelte-hero-icons": "^4.0.3",
"svelte-jester": "^2.3.1",
"svelte-notifications": "^0.9.93",
"svelte-preprocess": "^4.9.4",
"tailwindcss": "^3.0.15",
"tailwindcss-safe-area": "^0.2.2",
"ts-jest": "^27.1.3",
"tslib": "^2.3.1",
"typescript": "^4.4.3"
},
Expand Down
Loading

0 comments on commit 89fa2dc

Please sign in to comment.