-
Notifications
You must be signed in to change notification settings - Fork 757
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9d26a71
commit 1a54312
Showing
6 changed files
with
55 additions
and
44 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
"use strict"; | ||
|
||
var path = require("path"); | ||
var request = require("supertest"); | ||
var assert = require("chai").assert; | ||
var browserSync = require(path.resolve("./")); | ||
|
||
var pkg = require(path.resolve("package.json")); | ||
var cli = require(path.resolve(pkg.bin)); | ||
|
||
describe("E2E CLI Snippet test", function () { | ||
|
||
var instance; | ||
|
||
before(function (done) { | ||
|
||
browserSync.reset(); | ||
|
||
cli({ | ||
cli: { | ||
input: ["start"], | ||
flags: { | ||
logLevel: "silent" | ||
} | ||
}, | ||
cb: function (err, bs) { | ||
instance = bs; | ||
done(); | ||
} | ||
}); | ||
}); | ||
after(function () { | ||
instance.cleanup(); | ||
}); | ||
it("serves versioned browser-sync client js", function (done) { | ||
request(instance.server) | ||
.get(instance.options.getIn(["scriptPaths", "versioned"])) | ||
.set("accept", "text/html") | ||
.expect(200) | ||
.end(function (err, res) { | ||
assert.include(res.text, "Connected to BrowserSync"); | ||
done(); | ||
}); | ||
}); | ||
it("serves browser-sync client js", function (done) { | ||
request(instance.server) | ||
.get(instance.options.getIn(["scriptPaths", "path"])) | ||
.set("accept", "text/html") | ||
.expect(200) | ||
.end(function (err, res) { | ||
assert.include(res.text, "Connected to BrowserSync"); | ||
done(); | ||
}); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.