We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8e146e1 + 1db3130 commit f2ba502Copy full SHA for f2ba502
packages/artifact/__tests__/config.test.ts
@@ -1,10 +1,14 @@
1
import * as config from '../src/internal/shared/config'
2
import os from 'os'
3
4
-// Mock the 'os' module
5
-jest.mock('os', () => ({
6
- cpus: jest.fn()
7
-}))
+// Mock the `cpus()` function in the `os` module
+jest.mock('os', () => {
+ const osActual = jest.requireActual('os')
+ return {
8
+ ...osActual,
9
+ cpus: jest.fn()
10
+ }
11
+})
12
13
beforeEach(() => {
14
jest.resetModules()
0 commit comments