Skip to content

Commit b379253

Browse files
committedJan 30, 2017
use temporary file creating in testing
1 parent 72d0e7f commit b379253

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed
 

‎.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ tickets.json
77
**.swp
88
.v8flags.*
99
*.txt
10-
yo.js

‎package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
},
1010
"devDependencies": {
1111
"chai": "^3.5.0",
12-
"mocha": "^3.2.0"
12+
"mocha": "^3.2.0",
13+
"tmp": "0.0.31"
1314
},
1415
"scripts": {
1516
"test": "node_modules/.bin/mocha",

‎test/reloader_test.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
const reloader = require('../reloader')
22
const assert = require('assert')
33
const fs = require('fs')
4+
const tmp = require('tmp');
45

5-
const TEST_FILE = './yo.js'
6+
const TEST_FILE = tmp.fileSync().name
67

78
describe("reload reloads", function() {
89
it("reloads if file is updated", function() {

0 commit comments

Comments
 (0)
Please sign in to comment.