Add TS tests tooling (#661)

* install test dependencies

* change config for tests

* fix linter failing tests

* add basic test file

* add custom element registration to test

* update dependencies

* add jest config file

* fix test calls on makefile and minor fix on test

* update local npm version

* clean testm file
This commit is contained in:
Fabio Pliger
2022-08-16 16:39:42 -05:00
committed by GitHub
parent 8275aa2810
commit 8aba271a42
7 changed files with 8964 additions and 21 deletions

View File

@@ -11,19 +11,24 @@
"format": "prettier --write './src/**/*.{js,svelte,html,ts}'",
"lint": "eslint './src/**/*.{js,svelte,html,ts}'",
"lint:fix": "eslint --fix './src/**/*.{js,svelte,html,ts}'",
"xprelint": "npm run format"
"xprelint": "npm run format",
"test": "jest --coverage",
"test:watch": "jest --watch"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^17.0.0",
"@rollup/plugin-node-resolve": "^11.0.0",
"@rollup/plugin-typescript": "^8.3.2",
"@tsconfig/svelte": "^1.0.0",
"@types/jest": "^28.1.6",
"@types/js-yaml": "^4.0.5",
"@typescript-eslint/eslint-plugin": "^5.20.0",
"@typescript-eslint/parser": "^5.20.0",
"autoprefixer": "^10.4.7",
"eslint": "^8.14.0",
"eslint-plugin-svelte3": "^3.4.1",
"jest": "^28.1.3",
"jest-environment-jsdom": "^28.1.3",
"postcss": "^8.4.13",
"prettier": "^2.6.2",
"prettier-plugin-svelte": "^2.7.0",
@@ -38,6 +43,7 @@
"svelte": "^3.48.0",
"svelte-check": "^1.0.0",
"svelte-preprocess": "^4.10.6",
"ts-jest": "^28.0.7",
"tslib": "^2.4.0",
"typescript": "^4.6.4"
},