-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1806 from apollographql/testing-improvements
Testing improvements
- Loading branch information
Showing
74 changed files
with
1,399 additions
and
1,251 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "TypeScript watch", | ||
"type": "shell", | ||
"command": "./node_modules/.bin/tsc", | ||
"args": [ | ||
"--build", | ||
"tsconfig.build.json", | ||
"--watch" | ||
], | ||
"isBackground": true, | ||
"problemMatcher": [ | ||
"$tsc-watch" | ||
], | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"presentation": { | ||
"reveal": "never", | ||
"panel": "dedicated" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
const { defaults } = require("jest-config"); | ||
|
||
module.exports = { | ||
testEnvironment: "node", | ||
setupFiles: [ | ||
"<rootDir>/../apollo-server-env/dist/index.js" | ||
], | ||
preset: "ts-jest", | ||
testMatch: null, | ||
testRegex: "/__tests__/.*\\.test\\.(js|ts)$", | ||
testPathIgnorePatterns: [ | ||
"/node_modules/", | ||
"/dist/" | ||
], | ||
moduleFileExtensions: [...defaults.moduleFileExtensions, "ts", "tsx"], | ||
moduleNameMapper: { | ||
'^__mocks__/(.*)$': '<rootDir>/../../__mocks__/$1', | ||
// This regex should match the packages that we want compiled from source | ||
// through `ts-jest`, as opposed to loaded from their output files in | ||
// `dist`. | ||
// We don't want to match `apollo-server-env` and | ||
// `apollo-engine-reporting-protobuf`, because these don't depend on | ||
// compilation but need to be initialized from as parto of `prepare`. | ||
'^(?!apollo-server-env|apollo-engine-reporting-protobuf)(apollo-(?:server|datasource|cache-control|tracing|engine)[^/]*|graphql-extensions)(?:/dist)?((?:/.*)|$)': '<rootDir>/../../packages/$1/src$2' | ||
}, | ||
clearMocks: true, | ||
globals: { | ||
"ts-jest": { | ||
tsConfig: "<rootDir>/src/__tests__/tsconfig.json", | ||
diagnostics: false | ||
} | ||
} | ||
}; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.