Skip to content

Commit 215aec7

Browse files
committed
Add features
1 parent 0f2fffa commit 215aec7

11 files changed

+1280
-164
lines changed

.vscode/launch.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Debug Jest Tests",
6+
"type": "node",
7+
"request": "launch",
8+
"runtimeArgs": [
9+
"--inspect-brk",
10+
"${workspaceRoot}/node_modules/.bin/jest",
11+
"--runInBand"
12+
],
13+
"console": "integratedTerminal",
14+
"internalConsoleOptions": "neverOpen",
15+
"port": 9229
16+
}
17+
]
18+
}

jest.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
preset: "ts-jest/presets/js-with-ts",
3+
testEnvironment: "node",
4+
testPathIgnorePatterns: ["<rootDir>/lib/", "<rootDir>/node_modules/"],
5+
moduleNameMapper: {
6+
"apollo-typed-documents": "<rootDir>/src",
7+
},
8+
};

package.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"scripts": {
2323
"build": "tsc",
2424
"prepare": "yarn run build",
25-
"postversion": "git push && git push --tags"
25+
"postversion": "git push && git push --tags",
26+
"test": "jest"
2627
},
2728
"peerDependencies": {
2829
"graphql": "^14.6.0",
@@ -31,19 +32,25 @@
3132
"devDependencies": {
3233
"@apollo/react-common": "^3.1.4",
3334
"@apollo/react-hooks": "^3.1.4",
35+
"@graphql-codegen/core": "^1.13.2",
3436
"@graphql-codegen/plugin-helpers": "^1.13.2",
37+
"@types/jest": "^25.2.1",
3538
"@types/node": "^13.11.1",
3639
"@types/react": "^16.9.34",
40+
"@types/tmp": "^0.1.0",
3741
"apollo-boost": "^0.4.7",
3842
"graphql": "^14.6.0",
3943
"import-sort-style-module": "^6.0.0",
44+
"jest": "^25.3.0",
4045
"pascal-case": "^3.1.1",
4146
"prettier": "^2.0.4",
4247
"prettier-plugin-import-sort": "^0.0.4",
48+
"tmp": "^0.1.0",
49+
"ts-jest": "^25.3.1",
4350
"typescript": "^3.8.3"
4451
},
4552
"importSort": {
46-
".ts": {
53+
".js,.ts": {
4754
"style": "module",
4855
"parser": "typescript"
4956
}

0 commit comments

Comments
 (0)