forked from aws/aws-cdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: fix regression tests (aws#8054)
The new-style integ tests don't run under the current regression test framework. 2 changes: 1. The regression tests were downloading the repository SOURCE from GitHub. That was fine as long as the tests were bash scripts (because source == artifact there), but now the tests are compiled, so we need to get the built artifacts (i.e., NPM package). (This is also more efficient as there will be less to download) 2. Because of the specific arguments to jest (all regexes instead of relative paths) and how it was being run, `jest` was finding and running multiple copies of the tests, but only one had been bootstrapped so for the other copy, `aws-sdk` was not found and the tests would error. Introduce a `jest.config.js` so that jest will treat the `test/integ/cli` directory as the root for tests and won't search elsewhere. Put as much config into it as possible if we've got it anyway (notably: `--runInBand` seems not to be able to go in there). Since the regression test are going to run the tests from the PREVIOUS version (which still has the bug), hotpatch the new test runner config over the old one (but be sure to leave the actual tests the same).
- Loading branch information
Showing
4 changed files
with
31 additions
and
10 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
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,11 @@ | ||
module.exports = { | ||
moduleFileExtensions: [ | ||
"js", | ||
], | ||
testMatch: [ | ||
"**/*.integtest.js", | ||
], | ||
testEnvironment: "node", | ||
bail: 1, | ||
verbose: true, | ||
}; |
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