Fix unit tests (#248)

* Fix tests

- Remove jest tests and add coverage

- Rebase master and fix tests

* Ignore local .vscode

Add clean script

* Fix deps

- Upgrade deps
- Switch to esnext

* Move tests to the right folder

* Deps cleanup and bump up

* Remove root level package.json

* Fix grumbles

* Remove the labeler action due to https://github.com/actions/labeler/issues/12

* Fix grumbles
This commit is contained in:
Chevdor
2020-04-21 16:36:33 +02:00
committed by GitHub
parent d03679a78a
commit 3cbad1c0b3
17 changed files with 2567 additions and 1910 deletions
+32 -45
View File
@@ -4,61 +4,48 @@
"author": "Parity Technologies Ltd. <admin@parity.io>",
"license": "GPL-3.0",
"description": "Polkadot Telemetry frontend",
"jest": {
"moduleFileExtensions": [
"ts",
"tsx",
"js"
],
"setupFiles": [
"jest-localstorage-mock"
],
"transform": {
"\\.(ts|tsx)$": "ts-jest"
},
"testRegex": "/test/.*\\.(spec).(ts|tsx|js)$"
},
"dependencies": {
"@fnando/sparkline": "maciejhirsz/sparkline",
"@polkadot/util-crypto": "^1.6.1",
"@types/react-measure": "^2.0.5",
"blakejs": "^1.1.0",
"husky": "^4.2.3",
"lint-staged": "^10.1.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-measure": "^2.3.0",
"react-scripts-ts": "2.17.0",
"react-svg": "^4.1.1",
"stable": "^0.1.8",
"tslint": "^6.1.0"
},
"scripts": {
"precommit": "lint-staged",
"start": "react-scripts-ts start",
"build": "react-scripts-ts build",
"test": "echo 'FIXME: FE tests need updating'",
"test": "TS_NODE_PROJECT=tsconfig.test.json tape -r ts-node/register test/**/*spec.ts",
"test:coverage": "nyc yarn test",
"eject": "react-scripts-ts eject",
"pretty:check": "prettier --check src/**/*.{ts,tsx}",
"pretty:fix": "prettier --write src"
"pretty:fix": "prettier --write src",
"clean": "rm -rf node_modules build .nyc env-config.js"
},
"dependencies": {
"@fnando/sparkline": "maciejhirsz/sparkline",
"@polkadot/util-crypto": "^2.8.1",
"@types/react-measure": "^2.0.6",
"blakejs": "^1.1.0",
"husky": "^4.2.5",
"lint-staged": "^10.1.3",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-measure": "^2.3.0",
"react-scripts-ts": "2.17.0",
"react-svg": "^11.0.18",
"stable": "^0.1.8",
"tslint": "^6.1.1"
},
"devDependencies": {
"@types/jest": "^23.0.2",
"@types/node": "^10.3.2",
"@types/react": "^16.3.17",
"@types/react-dom": "^16.0.6",
"@types/react-svg": "^3.0.0",
"babel-jest": "^23.6.0",
"@types/node": "^13.11.1",
"@types/react": "^16.9.34",
"@types/react-dom": "^16.9.6",
"@types/react-svg": "^5.0.0",
"@types/tape": "^4.2.34",
"babel-preset-env": "^1.7.0",
"babel-preset-react": "^6.24.1",
"enzyme": "^3.6.0",
"enzyme-adapter-react-16": "^1.5.0",
"jest": "^23.6.0",
"jest-localstorage-mock": "^2.2.0",
"mock-socket": "^8.0.2",
"prettier": "^2.0.2",
"react-test-renderer": "^16.5.2",
"ts-jest": "^23.10.2",
"identity-obj-proxy": "^3.0.0",
"istanbul": "^0.4.5",
"jest": "^25.3.0",
"nyc": "^15.0.1",
"prettier": "^2.0.4",
"tape": "^4.13.2",
"ts-node": "^8.8.2",
"tslint": "^6.1.1",
"tslint-config-prettier": "^1.18.0",
"tslint-plugin-prettier": "^2.3.0",
"typescript": "^2.9.2"