-
Notifications
You must be signed in to change notification settings - Fork 417
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic help tests as examples (#112)
* Make basic tests of help command output * Remove sudo from build script Signed-off-by: campionfellin <campionfellin@gmail.com>
- Loading branch information
1 parent
38ef833
commit ef47d28
Showing
2 changed files
with
34 additions
and
2 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,27 @@ | ||
const expect = require('chai').expect; | ||
const spawnSync = require('child_process').spawnSync; | ||
|
||
describe('Test help for each function', () => { | ||
|
||
it('should output help for run command', () => { | ||
const result = spawnSync( | ||
'clasp', ['run', '--help'], { encoding : 'utf8' } | ||
); | ||
|
||
expect(result.status).to.equal(0); | ||
expect(result.stdout).to.include('Run a function in your Apps Scripts project'); | ||
}); | ||
|
||
it('should output help for logs command', () => { | ||
const result = spawnSync( | ||
'clasp', ['logs', '--help'], { encoding : 'utf8', detached: true } | ||
); | ||
|
||
expect(result.status).to.equal(0); | ||
expect(result.stdout).to.include('Shows the StackDriver Logs'); | ||
}); | ||
|
||
}); | ||
|
||
|
||
|