Skip to content

Commit 3406e8b

Browse files
committed
Fix another interface
1 parent de8f06a commit 3406e8b

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/test/common/platform/fs-temp.unit.test.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ import { TemporaryFileSystem } from '../../../client/common/platform/fs-temp';
77

88
interface IDeps {
99
// tmp module
10-
file(
11-
config: { postfix?: string; mode?: number },
12-
13-
callback?: (err: any, path: string, fd: number, cleanupCallback: () => void) => void,
14-
): void;
10+
fileSync(config: {
11+
postfix?: string;
12+
mode?: number;
13+
}): {
14+
name: string;
15+
fd: number;
16+
removeCallback(): void;
17+
};
1518
}
1619

1720
suite('FileSystem - temp files', () => {
@@ -28,7 +31,7 @@ suite('FileSystem - temp files', () => {
2831
suite('createFile', () => {
2932
test(`fails if the raw call fails`, async () => {
3033
const failure = new Error('oops');
31-
deps.setup((d) => d.file({ postfix: '.tmp', mode: undefined }, TypeMoq.It.isAny()))
34+
deps.setup((d) => d.fileSync({ postfix: '.tmp', mode: undefined }))
3235
// fail with an arbitrary error
3336
.throws(failure);
3437

@@ -40,7 +43,7 @@ suite('FileSystem - temp files', () => {
4043

4144
test(`fails if the raw call "returns" an error`, async () => {
4245
const failure = new Error('oops');
43-
deps.setup((d) => d.file({ postfix: '.tmp', mode: undefined }, TypeMoq.It.isAny())).callback((_cfg, cb) =>
46+
deps.setup((d) => d.fileSync({ postfix: '.tmp', mode: undefined })).callback((_cfg, cb) =>
4447
cb(failure, '...', -1, () => {}),
4548
);
4649

0 commit comments

Comments
 (0)