|
1 | 1 | /* globals describe it */ |
2 | 2 |
|
3 | | -if(process.env.NO_WATCH_TESTS) { |
4 | | - describe("NodeWatchFileSystem", function() { |
5 | | - it("tests excluded"); |
6 | | - }); |
7 | | - return; |
8 | | -} |
9 | | - |
10 | 3 | var should = require("should"); |
11 | | -var path = require("path"); |
12 | | -var fs = require("fs"); |
13 | | - |
14 | 4 | var NodeWatchFileSystem = require("../lib/node/NodeWatchFileSystem"); |
15 | 5 |
|
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 | | - |
20 | 6 | describe("NodeWatchFileSystem", function() { |
21 | | - this.timeout(10000); |
22 | | - |
23 | 7 | it('should throw if \'files\' argument is not an array', function() { |
24 | 8 | should(function() { |
25 | 9 | new NodeWatchFileSystem().watch(undefined) |
@@ -62,6 +46,19 @@ describe("NodeWatchFileSystem", function() { |
62 | 46 | }).throw("Invalid arguments: 'callbackUndelayed'"); |
63 | 47 | }); |
64 | 48 |
|
| 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 | + |
65 | 62 | it("should register a file change (change delayed)", function(done) { |
66 | 63 | var startTime = new Date().getTime(); |
67 | 64 | var wfs = new NodeWatchFileSystem(); |
|
0 commit comments