Initial commit
This commit is contained in:
5
node_modules/magicli/tests/test-modules/object-flat/bin/cli.js
generated
vendored
Normal file
5
node_modules/magicli/tests/test-modules/object-flat/bin/cli.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
'use strict';
|
||||
|
||||
require('../../../../')();
|
||||
9
node_modules/magicli/tests/test-modules/object-flat/lib/index.js
generated
vendored
Normal file
9
node_modules/magicli/tests/test-modules/object-flat/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
`use strict`;
|
||||
|
||||
module.exports = {
|
||||
methodA: function(param1, param2) {
|
||||
return `${param1}-${param2}`;
|
||||
},
|
||||
|
||||
methodB: (param1, param2) => `${param1-param2}`
|
||||
}
|
||||
8
node_modules/magicli/tests/test-modules/object-flat/package.json
generated
vendored
Normal file
8
node_modules/magicli/tests/test-modules/object-flat/package.json
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"name": "object-flat",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"description": "Test object-flat",
|
||||
"main": "./lib/index.js",
|
||||
"bin": "./bin/cli.js"
|
||||
}
|
||||
60
node_modules/magicli/tests/test-modules/object-flat/specs.js
generated
vendored
Normal file
60
node_modules/magicli/tests/test-modules/object-flat/specs.js
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
'use strict';
|
||||
|
||||
const tests = [{
|
||||
description: 'Version --version',
|
||||
input: '--version',
|
||||
output: `0.0.0`
|
||||
},{
|
||||
description: 'Help --help',
|
||||
input: '--help',
|
||||
output: `
|
||||
[4;1mDescription:[0m
|
||||
|
||||
Test object-flat
|
||||
|
||||
[4;1mUsage:[0m
|
||||
|
||||
$ object-flat <command>
|
||||
|
||||
[4;1mCommands:[0m
|
||||
|
||||
methodA
|
||||
methodB
|
||||
`
|
||||
}, {
|
||||
description: 'methodA --help',
|
||||
input: 'methodA --help',
|
||||
output: `
|
||||
[4;1mUsage:[0m
|
||||
|
||||
$ object-flat methodA [options]
|
||||
|
||||
[4;1mOptions:[0m
|
||||
|
||||
[1m--param1[0m
|
||||
[1m--param2[0m
|
||||
`
|
||||
}, {
|
||||
description: 'methodB --help',
|
||||
input: 'methodB --help',
|
||||
output: `
|
||||
[4;1mUsage:[0m
|
||||
|
||||
$ object-flat methodB [options]
|
||||
|
||||
[4;1mOptions:[0m
|
||||
|
||||
[1m--param1[0m
|
||||
[1m--param2[0m
|
||||
`
|
||||
}, {
|
||||
description: 'methodA --param2="Z" --param1="K"',
|
||||
input: 'methodA --param2="Z" --param1="K"',
|
||||
output: `K-Z`
|
||||
}, {
|
||||
description: 'methodB --param1=3 --param2=2',
|
||||
input: 'methodB --param1=3 --param2=2',
|
||||
output: `1`
|
||||
}];
|
||||
|
||||
module.exports = tests;
|
||||
Reference in New Issue
Block a user