Skip to content

Commit fb0e154

Browse files
committed
deps: update mocha@3.4.1
1 parent 0452c8d commit fb0e154

File tree

2 files changed

+34
-86
lines changed

2 files changed

+34
-86
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"istanbul": "0.4.5",
7979
"istanbul-coveralls": "1.0.3",
8080
"lodash-cli": "4.15.0",
81-
"mocha": "3.0.2",
81+
"mocha": "3.4.1",
8282
"q": "1.4.1",
8383
"request": "2.79.0",
8484
"rimraf": "2.5.4",

test/specs/e2e/files/e2e.file.options.js

Lines changed: 33 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -9,101 +9,49 @@ var outpath = path.join(__dirname, "../../fixtures");
99

1010
describe("file-watching", function () {
1111

12-
describe("E2E Adding namespaced watchers", function () {
12+
it("Watches files with no namespace", function (done) {
13+
browserSync.reset();
1314

14-
var instance, file;
15-
16-
before(function (done) {
17-
18-
browserSync.reset();
19-
20-
file = path.join(outpath, "watch-func.txt");
21-
22-
var config = {
23-
files: file,
24-
logLevel: "silent"
25-
};
26-
27-
instance = browserSync(config, done).instance;
28-
});
29-
30-
after(function () {
31-
instance.cleanup();
32-
});
33-
34-
it("Watches files with no namespace", function (done) {
35-
36-
assert.ok(instance.watchers.core.watchers);
37-
assert.equal(instance.watchers.core.watchers.length, 1);
38-
done();
15+
browserSync({
16+
files: path.join(outpath, "watch-func.txt"),
17+
logLevel: "silent"
18+
}, function(err, bs) {
19+
assert.ok(bs.watchers.core.watchers);
20+
assert.equal(bs.watchers.core.watchers.length, 1);
21+
bs.cleanup(done);
3922
});
4023
});
4124

42-
describe("E2E Adding namespaced watchers", function () {
43-
44-
var instance, file;
45-
46-
before(function (done) {
47-
48-
browserSync.reset();
49-
50-
file = path.join(outpath, "watch-func.txt");
51-
52-
var config = {
53-
files: "*.html",
54-
logLevel: "silent"
55-
};
25+
it("Watches files when multi given", function(done) {
26+
browserSync.reset();
5627

57-
instance = browserSync(config, done).instance;
58-
});
59-
60-
after(function () {
61-
instance.cleanup();
62-
});
63-
64-
it("Watches files when multi given", function (done) {
65-
66-
assert.ok(instance.watchers.core.watchers);
67-
assert.ok(instance.watchers.core.watchers[0]);
68-
done();
28+
browserSync({
29+
files: "*.html",
30+
logLevel: "silent"
31+
}, function(err, bs) {
32+
assert.ok(bs.watchers.core.watchers);
33+
assert.ok(bs.watchers.core.watchers[0]);
34+
bs.cleanup(done);
6935
});
7036
});
7137

72-
describe("E2E Adding namespaced watchers", function () {
73-
74-
var instance, file;
75-
76-
before(function (done) {
77-
78-
browserSync.reset();
38+
it("Watches files when multi given + objs", function(done) {
39+
browserSync.reset();
7940

80-
file = path.join(outpath, "watch-func.txt");
81-
82-
var config = {
83-
files: [
84-
"*.html",
85-
{
86-
match: "*.css",
87-
fn: function (event, file) {
88-
console.log(file);
89-
}
41+
browserSync({
42+
files: [
43+
"*.html",
44+
{
45+
match: "*.css",
46+
fn: function (event, file) {
47+
console.log(file);
9048
}
91-
],
92-
logLevel: "silent"
93-
};
94-
95-
instance = browserSync(config, done).instance;
96-
});
97-
98-
after(function () {
99-
instance.cleanup();
100-
});
101-
102-
it("Watches files when multi given + objs", function (done) {
103-
104-
assert.ok(instance.watchers.core.watchers);
105-
assert.equal(instance.watchers.core.watchers.length, 2);
106-
done();
49+
}
50+
]
51+
}, function (err, bs) {
52+
assert.ok(bs.watchers.core.watchers);
53+
assert.equal(bs.watchers.core.watchers.length, 2);
54+
bs.cleanup(done);
10755
});
10856
});
10957
});

0 commit comments

Comments
 (0)