Skip to content

Commit

Permalink
test: create additional tests for #mkdtemp
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Jul 7, 2019
1 parent 7e22617 commit 0a6b4a6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/__tests__/volume.test.ts
Expand Up @@ -937,6 +937,14 @@ describe('volume', () => {
});
describe('.mkdtemp(prefix[, options], callback)', () => {
xit('Create temp dir at root', () => {});
it('throws when prefix is not a string', () => {
const vol = new Volume();
expect(() => vol.mkdtemp({} as string, () => {})).toThrow(TypeError);
});
it('throws when prefix contains null bytes', () => {
const vol = new Volume();
expect(() => vol.mkdtemp('/tmp-\u0000', () => {})).toThrow(/path.+string.+null bytes/i);
});
});
describe('.rmdirSync(path)', () => {
it('Remove single dir', () => {
Expand Down

0 comments on commit 0a6b4a6

Please sign in to comment.