Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
08e1b3a
Update Jest and related packages to latest versions
martijnwalraven Jan 28, 2021
1f470ad
Rename `ts-jest` `tsConfig` option to `tsconfig`
martijnwalraven Jan 28, 2021
2e32c05
Remove use of `moduleNameMapper` for local imports
martijnwalraven Jan 28, 2021
806b959
Update TypeScript to 4.1.3
martijnwalraven Jan 28, 2021
7e86ef7
Clean up test projects and reference all tests from root tsconfig.tes…
martijnwalraven Jan 28, 2021
cf7368e
Add a TypeScript watch task to VS Code
martijnwalraven Jan 28, 2021
879ddd0
Re-enable `strictNullChecks` for composition tests and fix using null…
martijnwalraven Jan 28, 2021
22395b6
Rely on `queryPlanSerializer` instead of pretty printing the query pl…
martijnwalraven Feb 2, 2021
68ef9d6
Move snapshot serializers and matchers to federaton-integration-tests…
martijnwalraven Feb 2, 2021
2cb7276
Fix Jest snapshot indentation for `graphql-js` AST
martijnwalraven Feb 4, 2021
417c79e
Add expected newlines in gateway snapshots
martijnwalraven Feb 4, 2021
6d338b9
Update `ts-jest` to latest version
martijnwalraven Feb 4, 2021
6304f18
Update `graphql-js` to v15
martijnwalraven Feb 4, 2021
8d663f1
Fix references for per `__tests__` directory `tsconfig.json`
martijnwalraven Feb 4, 2021
894cfed
Remove unnecessary declaration of `addSnapshotSerializer`
martijnwalraven Feb 4, 2021
12ad3bf
Fix typings for `toHaveFetched` matchers
martijnwalraven Feb 4, 2021
d5c4e71
Clean up `toMatchAST` and add `toMatchQueryPlan`
martijnwalraven Feb 4, 2021
912716d
Simplify Jest configs and ensure `testSetup.js` is included in every …
martijnwalraven Feb 4, 2021
5192e3f
Use `tsconfig.test.json` from `ts-jest` instead of root `__tests__` one
martijnwalraven Feb 4, 2021
9d75cb8
Avoid path mapping for mocks and fix typing issues
martijnwalraven Feb 5, 2021
2b3af8a
Add `@apollo/query-planner` package
martijnwalraven Feb 26, 2021
d9bdbc6
Move `prettyFormatQueryPlan` and related serializers to `@apollo/quer…
martijnwalraven Feb 26, 2021
50a37ac
Update package-lock.json for @apollo/query-planner
martijnwalraven Mar 2, 2021
6ad7fe5
Import matchers from subdirectory instead of root
martijnwalraven Mar 2, 2021
e007c3c
Add more test typing fixes using null coalescing
martijnwalraven Mar 2, 2021
b7ac4d2
Remove unnecessary header iteration from toHaveFetched
martijnwalraven Mar 2, 2021
a359e23
Fix `toHaveFetched` typing to support JSON body
martijnwalraven Mar 2, 2021
7859038
Update __tests__ tsconfig.json to include mocks
martijnwalraven Mar 2, 2021
ff0bfa6
Remove some unused imports from tests
martijnwalraven Mar 2, 2021
2feb7a5
Import `QueryPlan` from `@apollo/query-planner` in test
martijnwalraven Mar 2, 2021
0cb2a3d
Add `@types` packages for `deep-freeze` and `bunyan`
martijnwalraven Mar 2, 2021
9ed379d
Remove more unused imports from tests
martijnwalraven Mar 2, 2021
05dda1a
Temporarily ignore typing errors in tests for incomplete request cont…
martijnwalraven Mar 2, 2021
b8ba02e
Temporarily ignore typing errors in tests for buildService
martijnwalraven Mar 2, 2021
07d848f
Fix type of Promise in test
martijnwalraven Mar 2, 2021
2b774f9
Avoid stringifying variables in test because that breaks typing
martijnwalraven Mar 2, 2021
c0cb248
Add resolver map type to test
martijnwalraven Mar 2, 2021
b76f8c4
Cast to any to allow arbitrary property mutation in test
martijnwalraven Mar 2, 2021
0bd250f
Fix `make-fetch-happen` types to allow `defaults()` chaining
martijnwalraven Mar 2, 2021
646230d
Change unused parameter to _ to avoid type error
martijnwalraven Mar 2, 2021
21dc682
Set `skipLibCheck` to true in `tsconfig` to avoid type errors from de…
martijnwalraven Mar 2, 2021
9d21dd5
Fix typing for Logger mock
martijnwalraven Mar 2, 2021
1b34ce5
Add non-null assertion for known schema types in test
martijnwalraven Mar 2, 2021
68b27f3
Merge branch 'main' into mw/testing-improvements
martijnwalraven Mar 2, 2021
042edda
Add non-null assertion to fix assignment from closure
martijnwalraven Mar 2, 2021
729faad
Update `apollo-server-core` dependency in `@apollo/gateway`
martijnwalraven Mar 2, 2021
58a88ef
Remove `skipLibCheck` and add workaround for typing issue in dependency
martijnwalraven Mar 3, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions jest.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ module.exports = {
moduleFileExtensions: [...defaults.moduleFileExtensions, "ts", "tsx"],
moduleNameMapper: {
'^__mocks__/(.*)$': '<rootDir>/src/__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`.
'^((?:federation-js|gateway-js)[^/]*)(?:/dist)?((?:/.*)|$)': '<rootDir>/../$1/src$2'
},
clearMocks: true,
globals: {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"release:version-bump": "lerna version --force-publish=@apollo/query-planner-wasm",
"release:start-ci-publish": "node -p '`Publish (dist-tag:${process.env.APOLLO_DIST_TAG || \"latest\"})`' | git tag -F - \"publish/$(date -u '+%Y%m%d%H%M%S')\" && git push origin \"$(git describe --match='publish/*' --tags --exact-match HEAD)\"",
"postinstall": "npm run rustup-ensure && lerna run monorepo-prepare --stream && npm run compile",
"pretest": "npm run compile",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your commit message reminds me - the cached TS builds were problematic for us when they were first introduced. Maybe we can stop wiping that cache in our clean script?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I agree with it possibly being more reliable and stable than it was when it was first released, I think I would still prefer — sanity-wise — if clean really did a proper clean, including cached build artifacts.

"test": "jest --verbose",
"test:clean": "jest --clearCache",
"test:watch": "jest --verbose --watchAll",
Expand Down