-
Notifications
You must be signed in to change notification settings - Fork 437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add basic help tests as examples #112
Conversation
Signed-off-by: campionfellin <campionfellin@gmail.com>
Signed-off-by: campionfellin <campionfellin@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
const spawnSync = require('child_process').spawnSync; | ||
|
||
describe('Test help for each function', () => { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Next time remove all these newlines.
(We should have a linter fail for these extra newlines everywhere).
); | ||
|
||
expect(result.status).to.equal(0); | ||
expect(result.stdout).to.include('Shows the StackDriver Logs'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
StackDriver logs
|
||
describe('Test help for each function', () => { | ||
|
||
it('should output help for run command', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 spaces everywhere.
(this should be checked by a lint rule next time)
We should name the directory |
Adds necessary testing libraries to the dev dependencies.
Adds
npm test
andnpm coverage
scripts to package.jsonEdits
npm build
script to not removeindex.js
Edits
npm build
script to remove thesudo
part, assudo
is now required in the.travis.yml
file.Creates 2 tests that check the
help
command forclasp run --help
andclasp logs --help
. These give ~10% code coverage and are meant as examples for further tests.See this build for testing output:
https://travis-ci.org/campionfellin/clasp/builds/367490854
Signed-off-by: campionfellin campionfellin@gmail.com