test(backend): APIテストの復活 (#10163)
* Revert 1c5291f818
* APIテストの復活
* apiテストの移行
* moduleNameMapper修正
* simpleGetでthrowしないように
status確認しているので要らない
* longer timeout
* ローカルでは問題ないのになんで
* case sensitive
* Run Nest instance within the current process
* Skip some setIntervals
* wait for 5 seconds
* kill them all!!
* logHeapUsage: true
* detectOpenHandlesがじゃましているらしい
* maxWorkers=1?
* restore drive api tests
* workerIdleMemoryLimit: 500MB
* 1024MiB
* Wait what
This commit is contained in:
parent
53987fadd7
commit
61215e50ff
27 changed files with 734 additions and 528 deletions
|
@ -91,7 +91,7 @@ module.exports = {
|
|||
// See https://github.com/swc-project/jest/issues/64#issuecomment-1029753225
|
||||
// TODO: Use `--allowImportingTsExtensions` on TypeScript 5.0 so that we can
|
||||
// directly import `.ts` files without this hack.
|
||||
'^(\\.{1,2}/.*)\\.js$': '$1',
|
||||
'^((?:\\.{1,2}|[A-Z:])*/.*)\\.js$': '$1',
|
||||
},
|
||||
|
||||
// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
|
||||
|
@ -160,7 +160,7 @@ module.exports = {
|
|||
testMatch: [
|
||||
"<rootDir>/test/unit/**/*.ts",
|
||||
"<rootDir>/src/**/*.test.ts",
|
||||
//"<rootDir>/test/e2e/**/*.ts"
|
||||
"<rootDir>/test/e2e/**/*.ts",
|
||||
],
|
||||
|
||||
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
|
||||
|
@ -207,4 +207,13 @@ module.exports = {
|
|||
// watchman: true,
|
||||
|
||||
extensionsToTreatAsEsm: ['.ts'],
|
||||
|
||||
testTimeout: 60000,
|
||||
|
||||
// Let Jest kill the test worker whenever it grows too much
|
||||
// (It seems there's a known memory leak issue in Node.js' vm.Script used by Jest)
|
||||
// https://github.com/facebook/jest/issues/11956
|
||||
maxWorkers: 1, // Make it use worker (that can be killed and restarted)
|
||||
logHeapUsage: true, // To debug when out-of-memory happens on CI
|
||||
workerIdleMemoryLimit: '1GiB', // Limit the worker to 1GB (GitHub Workflows dies at 2GB)
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue