We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
sindresorhus
Learn more about funding links in repositories.
Report abuse
temp-dir
1 parent 37229ce commit 1a64f8bCopy full SHA for 1a64f8b
test.js
@@ -1,12 +1,12 @@
1
import path from 'path';
2
-import {tmpdir} from 'os';
+import tempDir from 'temp-dir';
3
import fs from 'fs';
4
import stream from 'stream';
5
import test from 'ava';
6
import tempy from '.';
7
8
test('.file()', t => {
9
- t.true(tempy.file().includes(tmpdir()));
+ t.true(tempy.file().includes(tempDir));
10
t.false(tempy.file().endsWith('.'));
11
t.false(tempy.file({extension: undefined}).endsWith('.'));
12
t.false(tempy.file({extension: null}).endsWith('.'));
@@ -33,7 +33,7 @@ test('.file()', t => {
33
});
34
35
test('.directory()', t => {
36
- t.true(tempy.directory().includes(tmpdir()));
+ t.true(tempy.directory().includes(tempDir));
37
38
39
test('.write(string)', async t => {
0 commit comments