-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
119 additions
and
56 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
language: node_js | ||
|
||
node_js: | ||
- "4.4.3" | ||
- "5.11.0" | ||
- "6.1" | ||
|
||
before_script: | ||
- npm install | ||
|
||
script: | ||
- npm run test |
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,30 @@ | ||
'use strict'; | ||
|
||
const assert = require('power-assert'); | ||
const cli = require('./cli'); | ||
|
||
const buildArgs = (str) => { | ||
let args = new Object(); | ||
args._ = []; | ||
args[str] = true; | ||
return args; | ||
}; | ||
|
||
describe('cli', () => { | ||
|
||
describe('options', () => { | ||
|
||
it('throw error of run `kaomojify` (empty)', () => { | ||
assert.strictEqual(cli(), 1); | ||
}); | ||
|
||
it('no error of run `kaomojify -v`', () => { | ||
assert.strictEqual(cli(buildArgs('-v')), 0); | ||
}); | ||
|
||
it('no error of run `kotori -h`', () => { | ||
assert.strictEqual(cli(buildArgs('-h')), 0); | ||
}); | ||
|
||
}); | ||
}); |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
'use strict'; | ||
|
||
module.exports = (text) => { | ||
'use strict'; | ||
|
||
let t; | ||
const b = [ | ||
"(c^_^o)", | ||
|
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,11 @@ | ||
#!/usr/bin/env node | ||
'use strict'; | ||
|
||
const yargs = require('yargs'); | ||
const cli = require('./cli'); | ||
|
||
const exitCode = cli(yargs.argv); | ||
|
||
process.on('exit', () => { | ||
process.exit(exitCode); | ||
}); |
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