Skip to content

Commit 1a64f8b

Browse files
authoredJul 17, 2020
Get temporary directory from temp-dir in unit tests (#24)
1 parent 37229ce commit 1a64f8b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import path from 'path';
2-
import {tmpdir} from 'os';
2+
import tempDir from 'temp-dir';
33
import fs from 'fs';
44
import stream from 'stream';
55
import test from 'ava';
66
import tempy from '.';
77

88
test('.file()', t => {
9-
t.true(tempy.file().includes(tmpdir()));
9+
t.true(tempy.file().includes(tempDir));
1010
t.false(tempy.file().endsWith('.'));
1111
t.false(tempy.file({extension: undefined}).endsWith('.'));
1212
t.false(tempy.file({extension: null}).endsWith('.'));
@@ -33,7 +33,7 @@ test('.file()', t => {
3333
});
3434

3535
test('.directory()', t => {
36-
t.true(tempy.directory().includes(tmpdir()));
36+
t.true(tempy.directory().includes(tempDir));
3737
});
3838

3939
test('.write(string)', async t => {

0 commit comments

Comments
 (0)
Please sign in to comment.