Skip to content

Commit 43ae35a

Browse files
committed
profile the tests
1 parent 8036e72 commit 43ae35a

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

repo-scripts/size-analysis/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"lint": "eslint -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
1414
"lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
1515
"pretest": "tsc -p test/test-inputs && rollup -c",
16-
"test": "yarn type-check && TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha **/*.test.ts --config ../../config/mocharc.node.js --timeout 10000",
17-
"test:ci": "node ../../scripts/run_tests_in_ci.js",
16+
"test": "yarn type-check && TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha **/*.test.ts --config ../../config/mocharc.node.js --timeout 300000",
17+
"test:ci": "yarn test",
1818
"type-check": "tsc -p . --noEmit"
1919
},
2020
"dependencies": {

repo-scripts/size-analysis/test/size-analysis.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ describe('extractDeclarations on .d.ts file', () => {
4343
let testModuleDtsFile: string;
4444
let extractedDeclarations: MemberList;
4545
before(() => {
46+
const start = Date.now();
4647
testModuleDtsFile = getTestModuleDtsFilePath();
4748
extractedDeclarations = extractDeclarations(testModuleDtsFile);
49+
console.log('extractDeclarations on .d.ts file took ', Date.now() - start);
4850
});
4951
// export {tar as tarr, tar1 as tarr1} from '..'
5052
it('test export rename', () => {
@@ -198,12 +200,17 @@ describe('extractDeclarations on js bundle file', () => {
198200
let subsetExportsBundleFile: string;
199201
let extractedDeclarations: MemberList;
200202
before(() => {
203+
const start = Date.now();
201204
const testModuleDtsFile: string = getTestModuleDtsFilePath();
202205
const map: Map<string, string> = buildMap(
203206
extractDeclarations(testModuleDtsFile)
204207
);
205208
subsetExportsBundleFile = getSubsetExportsBundleFilePath();
206209
extractedDeclarations = extractDeclarations(subsetExportsBundleFile, map);
210+
console.log(
211+
'extractDeclarations on js bundle file took ',
212+
Date.now() - start
213+
);
207214
});
208215
it('test variable extractions', () => {
209216
const variablesArray = ['aVar', 'fs1'];

0 commit comments

Comments
 (0)