Skip to content

Commit 591a730

Browse files
committed
fix test cases for prototype-less timestamps object
1 parent 3d12e55 commit 591a730

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

‎test/NodeWatchFileSystem.test.js‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ describe("NodeWatchFileSystem", function() {
6868
if(err) throw err;
6969
filesModified.should.be.eql([fileDirect]);
7070
dirsModified.should.be.eql([]);
71-
fileTimestamps.should.have.property(fileDirect).have.type("number");
71+
Object.assign({}, fileTimestamps).should.have.property(fileDirect).have.type("number");
7272
watcher.close();
7373
done();
7474
});
@@ -87,7 +87,7 @@ describe("NodeWatchFileSystem", function() {
8787
if(err) throw err;
8888
filesModified.should.be.eql([fileDirect]);
8989
dirsModified.should.be.eql([]);
90-
fileTimestamps.should.have.property(fileDirect).have.type("number");
90+
Object.assign({}, fileTimestamps).should.have.property(fileDirect).have.type("number");
9191
watcher.close();
9292
done();
9393
});
@@ -104,7 +104,7 @@ describe("NodeWatchFileSystem", function() {
104104
if(err) throw err;
105105
filesModified.should.be.eql([]);
106106
dirsModified.should.be.eql([fixtures]);
107-
dirTimestamps.should.have.property(fixtures).have.type("number");
107+
Object.assign({}, dirTimestamps).should.have.property(fixtures).have.type("number");
108108
watcher.close();
109109
done();
110110
});
@@ -123,7 +123,7 @@ describe("NodeWatchFileSystem", function() {
123123
if(err) throw err;
124124
filesModified.should.be.eql([]);
125125
dirsModified.should.be.eql([fixtures]);
126-
dirTimestamps.should.have.property(fixtures).have.type("number");
126+
Object.assign({}, dirTimestamps).should.have.property(fixtures).have.type("number");
127127
watcher.close();
128128
done();
129129
});
@@ -140,7 +140,7 @@ describe("NodeWatchFileSystem", function() {
140140
if(err) throw err;
141141
filesModified.should.be.eql([]);
142142
dirsModified.should.be.eql([fixtures]);
143-
dirTimestamps.should.have.property(fixtures).have.type("number");
143+
Object.assign({}, dirTimestamps).should.have.property(fixtures).have.type("number");
144144
watcher.close();
145145
done();
146146
});
@@ -159,7 +159,7 @@ describe("NodeWatchFileSystem", function() {
159159
if(err) throw err;
160160
filesModified.should.be.eql([]);
161161
dirsModified.should.be.eql([fixtures]);
162-
dirTimestamps.should.have.property(fixtures).have.type("number");
162+
Object.assign({}, dirTimestamps).should.have.property(fixtures).have.type("number");
163163
watcher.close();
164164
done();
165165
});
@@ -177,9 +177,9 @@ describe("NodeWatchFileSystem", function() {
177177
if(err) throw err;
178178
filesModified.should.be.eql([fileSubdir, fileDirect]);
179179
dirsModified.should.be.eql([fixtures]);
180-
fileTimestamps.should.have.property(fileDirect).have.type("number");
181-
fileTimestamps.should.have.property(fileSubdir).have.type("number");
182-
dirTimestamps.should.have.property(fixtures).have.type("number");
180+
Object.assign({}, fileTimestamps).should.have.property(fileDirect).have.type("number");
181+
Object.assign({}, fileTimestamps).should.have.property(fileSubdir).have.type("number");
182+
Object.assign({}, dirTimestamps).should.have.property(fixtures).have.type("number");
183183
watcher.close();
184184
done();
185185
});
@@ -197,9 +197,9 @@ describe("NodeWatchFileSystem", function() {
197197
if(err) throw err;
198198
filesModified.should.be.eql([fileSubdir, fileDirect]);
199199
dirsModified.should.be.eql([fixtures]);
200-
fileTimestamps.should.have.property(fileDirect).have.type("number");
201-
fileTimestamps.should.have.property(fileSubdir).have.type("number");
202-
dirTimestamps.should.have.property(fixtures).have.type("number");
200+
Object.assign({}, fileTimestamps).should.have.property(fileDirect).have.type("number");
201+
Object.assign({}, fileTimestamps).should.have.property(fileSubdir).have.type("number");
202+
Object.assign({}, dirTimestamps).should.have.property(fixtures).have.type("number");
203203
watcher.close();
204204
done();
205205
});

0 commit comments

Comments
 (0)