-
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.
feat(plugins): Allow plugins to be given inline within options hash
- Loading branch information
1 parent
87a2381
commit fd4ccd9
Showing
3 changed files
with
30 additions
and
7 deletions.
There are no files selected for viewing
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
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,29 @@ | ||
"use strict"; | ||
|
||
var browserSync = require("../../../"); | ||
|
||
var assert = require("chai").assert; | ||
|
||
describe("Plugins: Retrieving user plugins when given inline with errors", function () { | ||
|
||
var instance; | ||
|
||
before(function (done) { | ||
|
||
browserSync.reset(); | ||
|
||
var config = { | ||
logLevel: "error", | ||
plugins: ["some-rnadomw-name-that-does-not-exist"] | ||
}; | ||
|
||
instance = browserSync(config, done).instance; | ||
}); | ||
after(function () { | ||
instance.cleanup(); | ||
}); | ||
it("Should give good errors when a plugin does not exist", function (done) { | ||
assert.equal(instance.getUserPlugins().length, 0); | ||
done(); | ||
}); | ||
}); |
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