Skip to content

Commit

Permalink
chore(repo): jest heap usage (#12706)
Browse files Browse the repository at this point in the history
* chore(repo): use --logHeapUsage with jest

* chore(datastore): break down unit tests to avoid heap out of memory
  • Loading branch information
HuiSF committed Dec 15, 2023
1 parent a6a413c commit fd0c6d8
Show file tree
Hide file tree
Showing 21 changed files with 2,395 additions and 2,302 deletions.
2 changes: 1 addition & 1 deletion packages/adapter-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"clean:size": "rimraf dual-publish-tmp tmp*",
"format": "echo \"Not implemented\"",
"lint": "tslint 'src/**/*.ts' && npm run ts-coverage",
"test": "npm run lint && jest -w 1 --coverage",
"test": "npm run lint && jest -w 1 --coverage --logHeapUsage",
"ts-coverage": "typescript-coverage-report -p ./tsconfig.build.json -t 90.31"
}
}
2 changes: 1 addition & 1 deletion packages/analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"access": "public"
},
"scripts": {
"test": "npm run lint && jest -w 1 --coverage",
"test": "npm run lint && jest -w 1 --coverage --logHeapUsage",
"test:watch": "tslint 'src/**/*.ts' && jest -w 1 --watch",
"build-with-test": "npm run clean && npm run test && npm run build",
"build:umd": "webpack && webpack --config ./webpack.config.dev.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/api-graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"access": "public"
},
"scripts": {
"test": "npm run lint && jest -w 1 --coverage",
"test": "npm run lint && jest -w 1 --coverage --logHeapUsage",
"test:watch": "tslint 'src/**/*.ts' && jest -w 1 --watch",
"build-with-test": "npm test && npm build",
"build:umd": "webpack && webpack --config ./webpack.config.dev.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/api-rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"access": "public"
},
"scripts": {
"test": "npm run lint && jest -w 1 --coverage",
"test": "npm run lint && jest -w 1 --coverage --logHeapUsage",
"test:watch": "tslint 'src/**/*.ts' && jest -w 1 --watch",
"build-with-test": "npm test && npm build",
"build:umd": "webpack && webpack --config ./webpack.config.dev.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"access": "public"
},
"scripts": {
"test": "npm run lint && jest -w 1 --coverage",
"test": "npm run lint && jest -w 1 --coverage --logHeapUsage",
"build-with-test": "npm test && npm run build",
"build:umd": "webpack && webpack --config ./webpack.config.dev.js",
"build:esm-cjs": "rollup -c rollup.config.mjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"access": "public"
},
"scripts": {
"test": "yarn lint --fix && jest -w 1 --coverage",
"test": "yarn lint --fix && jest -w 1 --coverage --logHeapUsage",
"build-with-test": "npm test && npm run build",
"build:umd": "webpack && webpack --config ./webpack.config.dev.js",
"build:esm-cjs": "rollup -c rollup.config.mjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-amplify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
},
"sideEffects": false,
"scripts": {
"test": "npm run lint && jest -w 1 --coverage",
"test": "npm run lint && jest -w 1 --coverage --logHeapUsage",
"test:size": "size-limit",
"build-with-test": "npm run clean && npm test && tsc && webpack -p",
"build:umd": "webpack && webpack --config ./webpack.config.dev.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"./dist/esm/Cache/index.mjs"
],
"scripts": {
"test": "npm run lint && jest -w 1 --coverage",
"test": "npm run lint && jest -w 1 --coverage --logHeapUsage",
"test:size": "size-limit",
"build-with-test": "npm test && npm run build",
"build:umd": "webpack && webpack --config ./webpack.config.dev.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/datastore-storage-adapter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"access": "public"
},
"scripts": {
"test": "npm run lint && jest -w 1 --coverage",
"test": "npm run lint && jest -w 1 --coverage --logHeapUsage",
"build-with-test": "npm test && npm run build",
"build:umd": "webpack && webpack --config ./webpack.config.dev.js",
"build:esm-cjs": "rollup -c rollup.config.mjs",
Expand Down
Loading

0 comments on commit fd0c6d8

Please sign in to comment.