Skip to content

Commit

Permalink
feat(test): jestを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
berlysia committed Mar 11, 2019
1 parent 2e251b8 commit 8c9cd7c
Show file tree
Hide file tree
Showing 3 changed files with 2,474 additions and 30 deletions.
9 changes: 9 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const path = require('path');

module.exports = {
preset: 'ts-jest',
runner: '@jest-runner/electron',
modulePaths: [path.resolve(__dirname, 'app')],
testEnvironment: '@jest-runner/electron/environment',
testMatch: ['**/app/**/*.test.ts'],
};
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"release": "yarn install --cwd bin && node bin/mini-release.js",
"webfont": "yarn install --cwd bin && node bin/generate-webfont.js",
"test": "node bin/i18n-early-check.js && tsc -p test && ava -v",
"test:unit": "tsc -p tsconfig.unit.json && cross-env NODE_PATH=./test-unit-dist ava --serial false -v test-unit-dist/**/*.test.js",
"test:unit": "jest",
"lint": "tslint -p . -c tslint.json",
"clear": "rimraf bundles/media",
"typedoc": "typedoc --out docs/dist ./app/services --mode modules --theme ./docs/theme --readme ./docs/README.md --ignoreCompilerErrors --excludePrivate --excludeExternals --hideGenerator",
Expand Down Expand Up @@ -114,11 +114,13 @@
},
"devDependencies": {
"7zip-bin": "^2.0.4",
"@jest-runner/electron": "^1.1.1",
"@types/archiver": "^2.0.1",
"@types/base64-js": "^1.2.5",
"@types/fetch-mock": "^7.2.3",
"@types/jest": "^24.0.9",
"@types/lodash": "^4.14.115",
"@types/node": "^8.0.0",
"@types/node-fetch": "^2.1.2",
"@types/proxyquire": "^1.3.28",
"@types/request": "^2.47.0",
"@types/semver": "^5.5.0",
Expand Down Expand Up @@ -151,17 +153,18 @@
"eslint-plugin-jsx-a11y": "^4.0.0",
"eslint-plugin-react": "^6.10.3",
"eslint-plugin-vue": "^2.0.1",
"fetch-mock": "^7.3.1",
"file-loader": "^1.1.10",
"fuse.js": "^3.2.0",
"husky": "^1.0.0-rc.13",
"jest": "^24.3.1",
"js-yaml": "^3.8.3",
"less": "^2.7.2",
"less-loader": "^4.0.6",
"lint-staged": "^7.2.0",
"lodash": "^4.17.4",
"lodash-decorators": "^4.3.1",
"moment": "^2.17.1",
"node-fetch": "^2.2.0",
"pixelmatch": "^4.0.2",
"pngjs": "^3.3.1",
"prettier": "1.14.0",
Expand All @@ -176,6 +179,7 @@
"spectron": "^3.6.4",
"style-loader": "^0.19.1",
"traverse": "^0.6.6",
"ts-jest": "^24.0.0",
"ts-loader": "^4.0.0",
"tslint": "^5.8.0",
"tslint-config-prettier": "^1.14.0",
Expand Down
Loading

0 comments on commit 8c9cd7c

Please sign in to comment.