Skip to content

Commit 357c1d4

Browse files
authored
fix: timeout bug (#178)
1 parent 5942001 commit 357c1d4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libraries/search-javascript/lib/testbuilding/JavaScriptSuiteBuilder.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ export class JavaScriptSuiteBuilder {
4949
const paths: string[] = [];
5050

5151
// write the test cases with logs to know what to assert
52+
let totalAmount = 0;
5253
if (compact) {
5354
for (const key of archive.keys()) {
55+
totalAmount += archive.get(key).length;
5456
const decodedTest = this.decoder.decode(
5557
archive.get(key),
5658
`${key}`,
@@ -67,6 +69,7 @@ export class JavaScriptSuiteBuilder {
6769
}
6870
} else {
6971
for (const key of archive.keys()) {
72+
totalAmount += archive.get(key).length;
7073
for (const testCase of archive.get(key)) {
7174
const decodedTest = this.decoder.decode(
7275
testCase,
@@ -93,7 +96,7 @@ export class JavaScriptSuiteBuilder {
9396

9497
const { stats, instrumentationData, assertionData } = await this.runner.run(
9598
paths,
96-
archive.size * 2
99+
totalAmount * 2
97100
);
98101
if (assertionData) {
99102
// put assertion data on testCases

0 commit comments

Comments
 (0)