Skip to content

Commit

Permalink
test(core): fix temp dir dispose test
Browse files Browse the repository at this point in the history
  • Loading branch information
nicojs committed Mar 13, 2020
1 parent ab17db1 commit 8c093d9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/core/test/unit/utils/TemporaryDirectory.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,12 @@ describe(TemporaryDirectory.name, () => {
beforeEach(() => sut.initialize());
it('should call deleteDir fileApi', async () => {
const expectedPath = path.resolve(tempDirName);
deleteDirStub.resolves('delResolveStub');
deleteDirStub.resolves();

const temporaryDirectoryInstance = sut;
const result = temporaryDirectoryInstance.dispose();
await temporaryDirectoryInstance.dispose();

expect(fileUtils.deleteDir).calledWith(expectedPath);

result.then(data => expect(data).equals('delResolveStub'));
});
});

Expand Down

0 comments on commit 8c093d9

Please sign in to comment.