Skip to content

Commit cc53ffc

Browse files
committed
fix: test called times after json schema faker rule fix
1 parent 9e21491 commit cc53ffc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/coverage.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ describe("coverage", () => {
305305
};
306306

307307
await coverage(options);
308-
expect(spy).toHaveBeenCalledTimes(12);
308+
expect(spy).toHaveBeenCalledTimes(3);
309309
});
310310
it("can handle multiple reporters", async () => {
311311
const reporter = new EmptyReporter();
@@ -333,13 +333,13 @@ describe("coverage", () => {
333333
await coverage(options);
334334

335335
expect(onBeginSpy).toHaveBeenCalledTimes(1);
336-
expect(onTestBeginSpy).toHaveBeenCalledTimes(12);
337-
expect(onTestEndSpy).toHaveBeenCalledTimes(12);
336+
expect(onTestBeginSpy).toHaveBeenCalledTimes(3);
337+
expect(onTestEndSpy).toHaveBeenCalledTimes(3);
338338
expect(onEndSpy).toHaveBeenCalledTimes(1);
339339

340340
expect(onBeginSpy2).toHaveBeenCalledTimes(1);
341-
expect(onTestBeginSpy2).toHaveBeenCalledTimes(12);
342-
expect(onTestEndSpy2).toHaveBeenCalledTimes(12);
341+
expect(onTestBeginSpy2).toHaveBeenCalledTimes(3);
342+
expect(onTestEndSpy2).toHaveBeenCalledTimes(3);
343343
expect(onEndSpy2).toHaveBeenCalledTimes(1);
344344
});
345345
});

src/rules/json-schema-faker-rule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class JsonSchemaFakerRule implements Rule {
2222
constructor(options?: RulesOptions) {
2323
this.skip = options?.skip;
2424
this.only = options?.only;
25-
this.numCalls = options?.numCalls || 5;
25+
this.numCalls = options?.numCalls || 10;
2626
}
2727
getTitle() {
2828
return "Generate params from json-schema-faker and expect results to match";

0 commit comments

Comments
 (0)