Open
Conversation
broxsonl
reviewed
Feb 15, 2017
| "indent": [ "error", 2 ], | ||
| "quotes": [ "error", "single" ], | ||
| "semi": ["error", "always"], | ||
| "linebreak-style": [ "error", "unix" ] |
| gulp.task('dev', function() { | ||
| gulp.watch(['**/*.js', '!node_module'], ['test', 'lint']); | ||
| }); | ||
| gulp.task('default', ['dev']); |
There was a problem hiding this comment.
Nice work making your default gulp task run all of your other gulp tasks.
|
|
||
| const greeting = require('../lab-khalid/lib/greet.js'); | ||
| console.log('working'); | ||
| greeting.hello(process.argv[2]); |
There was a problem hiding this comment.
Great use of process.argv and passing it into the greeting module's hello method.
| module.exports = exports = {}; | ||
|
|
||
| exports.hello = function(name) { | ||
| if(arguments.length === 0) throw new Error('Name not received'); |
There was a problem hiding this comment.
Nice conditional to determine if the name has been passed in or not.
| exports.hello = function(name) { | ||
| if(arguments.length === 0) throw new Error('Name not received'); | ||
| console.log(name); | ||
| return `Hello, ${name}!`; |
|
|
||
|
|
||
| describe('Greeting module', function() { | ||
| describe('#hello', function(){ |
There was a problem hiding this comment.
Nice work with the # before the method name inyour test describe block.
| describe('#hello', function(){ | ||
| it('should return hello khalid', function() { | ||
| const result = greeting.hello('khalid'); | ||
| expect(result).to.equal('Hello, khalid!'); |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.