Skip to content

Commit 39061de

Browse files
fix: Add ENOENT code in mocked test error
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent ecc5ec2 commit 39061de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/notebooks/deepnote/deepnoteRequirementsHelper.node.unit.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ suite('DeepnoteRequirementsHelper', () => {
6666

6767
// Mock fs.promises to check file doesn't exist
6868
const fsAccessStub = sandbox.stub(fs.promises, 'access');
69-
fsAccessStub.rejects(new Error('File not found'));
69+
const notFoundError = Object.assign(new Error('File not found'), { code: 'ENOENT' });
70+
fsAccessStub.rejects(notFoundError);
7071

7172
// Mock fs.promises.writeFile to capture what's written
7273
let writtenContent = '';

0 commit comments

Comments
 (0)