Skip to content

Commit

Permalink
added failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
shakyShane committed Jun 24, 2021
1 parent d7cdcec commit f6336ea
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions packages/browser-sync/test/specs/e2e/e2e.options.snippet.js
Expand Up @@ -141,3 +141,35 @@ describe("E2E snippet custom regex", function() {
});
});
});
describe("E2E snippet: false", function() {
var instance;

before(function(done) {
browserSync.reset();
var config = {
server: {
baseDir: "test/fixtures"
},
open: false,
snippet: false,
};
instance = browserSync(config, done).instance;
});

after(function() {
instance.cleanup();
});

it("does not add the snippet when snippet: false", function(done) {
request(instance.server)
.get("/iframe.html")
.set("accept", "text/html")
.expect(200)
.end(function(err, res) {
if (res.text.indexOf(instance.options.get("snippet")) > -1) {
return done(new Error("snippet present"));
}
done();
});
});
});

0 comments on commit f6336ea

Please sign in to comment.