Conversation
The tracker's jest suites ran in no workflow: the root jest.config.js only picks up */functions/jest.config.js and gen-schema-view, and nothing invoked the package's test:local. That left the shared package both the legacy extension and the kit depend on without regression protection, including the offline tests added by #2937 for the insert retry guard. Fixes #3053
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces an offline Jest configuration (jest.offline.config.js) and a corresponding test:offline script in package.json to run tests that do not require active GCP credentials. The feedback suggests a minor improvement to inherit and extend testPathIgnorePatterns from the base configuration rather than overriding it with a hardcoded array, ensuring better maintainability if the base configuration changes in the future.
…ore patterns Use the standard escape idiom so CodeQL js/incomplete-sanitization is satisfied. Generated patterns are unchanged.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The change tracker's jest suites ran in no CI workflow, so the shared package both the legacy extension and the kit depend on had no regression protection, including the offline tests #2937 added for the insert retry guard. Root
jest.config.jsonly picks up*/functions/jest.config.jsand gen-schema-view, and nothing invoked the package'stest:local.Most of the tracker's suites create real BigQuery datasets/tables/views or write to a real Firestore, so they can't run on a PR. This adds a CI job that runs the suites that pass without credentials.
Changes
jest.offline.config.js, which reusesjest.config.jsand ignores the 11 suites that need a live GCP project.test:offlinenpm script to the tracker package.change_trackerjob to.github/workflows/test.ymlthat runsnpm ci && npm run test:offlinein the package directory.Verification:
npm run test:offlinepasses, 8 suites / 137 tests in ~43s. The excluded list was determined by running every suite with no credentials, not from the file names, soclusteringandcheckUpdatesare excluded despite the pattern suggested in the issue.Unknown option "types"jest validation warning fromjest.config.jsis left alone, out of scope.Fixes #3053