Skip to content

Commit 1822c35

Browse files
use actions 1.10.0 and mock fs for tests (#205)
1 parent f15ed65 commit 1822c35

File tree

3 files changed

+4710
-17
lines changed

3 files changed

+4710
-17
lines changed

index.test.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,17 @@ const fs = require('fs');
55

66
jest.mock('@actions/core');
77
jest.mock('tmp');
8-
jest.mock('fs');
8+
jest.mock('fs', () => ({
9+
promises: {
10+
access: jest.fn()
11+
},
12+
constants: {
13+
O_CREATE: jest.fn()
14+
},
15+
rmdirSync: jest.fn(),
16+
existsSync: jest.fn(),
17+
writeFileSync: jest.fn()
18+
}));
919

1020
describe('Render task definition', () => {
1121

0 commit comments

Comments
 (0)