Skip to content

Commit 08135aa

Browse files
committedApr 13, 2017
tests: use temp-path for paths
1 parent ca3ce4e commit 08135aa

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed
 

‎package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"eslint-plugin-standard": "2.1.1",
2525
"istanbul": "0.4.5",
2626
"mocha": "2.5.3",
27-
"supertest": "1.1.0"
27+
"supertest": "1.1.0",
28+
"temp-path": "1.0.0"
2829
},
2930
"files": [
3031
"LICENSE",

‎test/support/tempIcon.js

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11

22
var crypto = require('crypto')
33
var fs = require('fs')
4-
var os = require('os')
5-
var path = require('path')
6-
var tmpdir = os.tmpdir || os.tmpDir
4+
var tempPath = require('temp-path')
75

86
module.exports = TempIcon
97

@@ -28,8 +26,3 @@ TempIcon.prototype.writeSync = function writeSync () {
2826
this.exists = true
2927
}
3028
}
31-
32-
function tempPath () {
33-
var fileName = 'favicon-' + (Date.now() + Math.random()) + '.ico'
34-
return path.join(tmpdir(), fileName)
35-
}

0 commit comments

Comments
 (0)
Please sign in to comment.