Skip to content

Commit

Permalink
test: updated (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
cap-Bernardito committed Oct 30, 2020
1 parent 661d1f8 commit 8ef95a6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/parallel-option.test.js
Expand Up @@ -16,11 +16,13 @@ import {
jest.mock('os', () => {
const actualOs = jest.requireActual('os');

actualOs.cpus = jest.fn(() => {
return { length: 4 };
});
const mocked = {
cpus: jest.fn(() => {
return { length: 4 };
}),
};

return actualOs;
return { ...actualOs, ...mocked };
});

// Based on https://github.com/facebook/jest/blob/edde20f75665c2b1e3c8937f758902b5cf28a7b4/packages/jest-runner/src/__tests__/test_runner.test.js
Expand Down

0 comments on commit 8ef95a6

Please sign in to comment.