MCPcopy
hub / github.com/jestjs/jest / verifyNumPassed

Function verifyNumPassed

e2e/__tests__/workerForceExit.test.ts:31–35  ·  view source on GitHub ↗
(stderr: string)

Source from the content-addressed store, hash-verified

29};
30
31const verifyNumPassed = (stderr: string) => {
32 const numberOfTestsPassed = (stderr.match(/\bPASS\b/g) || []).length;
33 // assuming -1 because of package.json, but +1 because of the individual test file
34 expect(numberOfTestsPassed).toBe(Object.keys(testFiles).length);
35};
36
37test('prints a warning if a worker is force exited', () => {
38 writeFiles(DIR, {

Callers 1

Calls 3

expectFunction · 0.85
matchMethod · 0.80
toBeMethod · 0.80

Tested by

no test coverage detected