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.
1 parent 93c10e8 commit 204160dCopy full SHA for 204160d
__tests__/readConfig.test.ts
@@ -1,13 +1,19 @@
1
import * as fs from 'fs';
2
import { readConfig, readJSONSync } from '../src/readConfig';
3
4
-jest.mock('fs', () => ({
5
- existsSync: jest.fn(),
6
- readFileSync: jest.fn(),
7
- promises: {
8
- access: jest.fn()
9
- }
10
-}));
+jest.mock('fs', () => {
+ const actualFs = jest.requireActual('fs');
+ return {
+ ...actualFs,
+ existsSync: jest.fn(),
+ readFileSync: jest.fn(),
+ promises: {
11
+ ...actualFs.promises,
12
+ access: jest.fn()
13
+ }
14
+ };
15
+});
16
+
17
jest.mock('@actions/core');
18
19
describe('readJSONSync', () => {
0 commit comments