Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
4ad74d1
commit 11007d5
Showing
3 changed files
with
40 additions
and
3 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
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 @@ | ||
import { assert } from 'chai'; | ||
import entry, { _load } from '../entry'; | ||
|
||
const PLUGINS = [ 'import' ]; | ||
|
||
PLUGINS.forEach(name => { | ||
suite.only(`Plugins: ${name}`); | ||
|
||
test('Present in default incredible configuration', function () { | ||
const extendedPath = entry.extends.find(p => p.includes(name)); | ||
|
||
assert.exists(extendedPath); | ||
assert.equal(extendedPath, _load.resolve(`plugins/${name}.js`)); | ||
}); | ||
|
||
test('Load actual plugin', function () { | ||
const plugin = _load(`plugins/${name}.js`); | ||
|
||
assert.exists(plugin); | ||
assert.deepEqual(plugin.plugins, [ name ]); | ||
}); | ||
|
||
test('Extends recommended configuration', function () { | ||
const plugin = _load(`plugins/${name}.js`); | ||
|
||
assert.exists(plugin); | ||
assert.includeMembers(plugin.extends, [ `plugin:${name}/recommended` ]); | ||
}); | ||
}); |