Skip to content

Commit 1f9dc71

Browse files
alistairjcbrownTheLarkInn
authored andcommitted
Run quick NodeWatchFileSystem tests as part of test run (webpack#3863)
1 parent 9681a3b commit 1f9dc71

1 file changed

Lines changed: 13 additions & 16 deletions

File tree

‎test/NodeWatchFileSystem.test.js‎

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,9 @@
11
/* globals describe it */
22

3-
if(process.env.NO_WATCH_TESTS) {
4-
describe("NodeWatchFileSystem", function() {
5-
it("tests excluded");
6-
});
7-
return;
8-
}
9-
103
var should = require("should");
11-
var path = require("path");
12-
var fs = require("fs");
13-
144
var NodeWatchFileSystem = require("../lib/node/NodeWatchFileSystem");
155

16-
var fixtures = path.join(__dirname, "fixtures");
17-
var fileDirect = path.join(fixtures, "watched-file.txt");
18-
var fileSubdir = path.join(fixtures, "subdir", "watched-file.txt");
19-
206
describe("NodeWatchFileSystem", function() {
21-
this.timeout(10000);
22-
237
it('should throw if \'files\' argument is not an array', function() {
248
should(function() {
259
new NodeWatchFileSystem().watch(undefined)
@@ -62,6 +46,19 @@ describe("NodeWatchFileSystem", function() {
6246
}).throw("Invalid arguments: 'callbackUndelayed'");
6347
});
6448

49+
if(process.env.NO_WATCH_TESTS) {
50+
it("long running tests excluded");
51+
return;
52+
}
53+
54+
var path = require("path");
55+
var fs = require("fs");
56+
var fixtures = path.join(__dirname, "fixtures");
57+
var fileDirect = path.join(fixtures, "watched-file.txt");
58+
var fileSubdir = path.join(fixtures, "subdir", "watched-file.txt");
59+
60+
this.timeout(10000);
61+
6562
it("should register a file change (change delayed)", function(done) {
6663
var startTime = new Date().getTime();
6764
var wfs = new NodeWatchFileSystem();

0 commit comments

Comments
 (0)