diff --git a/test/Watchpack.js b/test/Watchpack.js index 4559c62..a1963ba 100644 --- a/test/Watchpack.js +++ b/test/Watchpack.js @@ -1237,6 +1237,8 @@ describe("Watchpack", function() { testHelper.symlinkFile(path.join("a", "b", "link"), "c"); testHelper.symlinkFile(path.join("a", "b", "link2"), "link"); testHelper.symlinkFile("link2", "link/link/link2"); + testHelper.dir("b"); + testHelper.symlinkDir(path.join("b", "link"), path.join("..", "a", "b")); testHelper.tick(1000, done); }); @@ -1368,6 +1370,20 @@ describe("Watchpack", function() { } ); }); + + it("should detect a change to symlinked file outside watched directory", function(done) { + expectWatchEvent( + [], + path.join(fixtures, "b"), + changes => { + Array.from(changes).should.be.eql([path.join(fixtures, "b")]); + done(); + }, + () => { + testHelper.file(path.join("a", "b", "d")); + } + ); + }); }); } else { it("symlinks");