-
Notifications
You must be signed in to change notification settings - Fork 754
/
user.plugins.inline.options.js
47 lines (38 loc) · 1.13 KB
/
user.plugins.inline.options.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
"use strict";
var browserSync = require("../../../");
var assert = require("chai").assert;
describe("Plugins: Retrieving user plugins when given inline with options", function () {
var instance;
var PLUGIN_NAME = "HTML Injector";
before(function (done) {
browserSync.reset();
var plugin = {
"bs-html-injector": {
files: "*.html"
}
};
var config = {
logLevel: "silent",
plugins: [
{
"bs-html-injector": {
files: "*.html"
}
}
]
};
instance = browserSync(config, done).instance;
});
after(function () {
instance.cleanup();
});
it("Should access to only the user-specified plugins", function (done) {
assert.equal(instance.getUserPlugins().length, 1);
done();
});
it("Should access to only the user-specified plugins", function (done) {
var plugin = instance.getUserPlugins()[0];
assert.equal(plugin.name, PLUGIN_NAME);
done();
});
});