mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
test(before) config, plugin -> options
This commit is contained in:
parent
4d14071ede
commit
ba93a87eed
5 changed files with 38 additions and 50 deletions
|
|
@ -17,10 +17,9 @@ const get = promisify((url, fn) => {
|
|||
});
|
||||
|
||||
test('cloudcmd: plugins', (t) => {
|
||||
const config = {};
|
||||
const plugins = [];
|
||||
|
||||
before(config, plugins, (port, after) => {
|
||||
before({plugins}, (port, after) => {
|
||||
get(`http://localhost:${port}/plugins.js`)
|
||||
.then(warp(_pullout, 'string'))
|
||||
.then((content) => {
|
||||
|
|
@ -35,12 +34,11 @@ test('cloudcmd: plugins', (t) => {
|
|||
});
|
||||
|
||||
test('cloudcmd: plugins', (t) => {
|
||||
const config = {};
|
||||
const plugins = [
|
||||
__filename
|
||||
];
|
||||
|
||||
before(config, plugins, (port, after) => {
|
||||
before({plugins}, (port, after) => {
|
||||
get(`http://localhost:${port}/plugins.js`)
|
||||
.then(warp(_pullout, 'string'))
|
||||
.then((content) => {
|
||||
|
|
@ -56,7 +54,6 @@ test('cloudcmd: plugins', (t) => {
|
|||
});
|
||||
|
||||
test('cloudcmd: plugins: load error', (t) => {
|
||||
const config = {};
|
||||
const noEntry = __filename + Math.random();
|
||||
const plugins = [
|
||||
__filename,
|
||||
|
|
@ -65,7 +62,7 @@ test('cloudcmd: plugins: load error', (t) => {
|
|||
|
||||
const msg = `ENOENT: no such file or directory, open '${noEntry}'`;
|
||||
|
||||
before(config, plugins, (port, after) => {
|
||||
before({plugins}, (port, after) => {
|
||||
get(`http://localhost:${port}/plugins.js`)
|
||||
.then(warp(_pullout, 'string'))
|
||||
.then((content) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue