-
Notifications
You must be signed in to change notification settings - Fork 17
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 gulpfile and change assert to expect #12
base: master
Are you sure you want to change the base?
add gulpfile and change assert to expect #12
Conversation
gulp.watch(['**/*.js', '!node_modules/**'], ['lint', 'test']); | ||
}); | ||
|
||
gulp.task('default', ['dev']); |
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.
Great work making your default gulp task run all of your other tasks.
|
||
const greet = require('./lib/greet.js'); | ||
|
||
greet.sayHey(); |
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.
Good, method naming.
|
||
exports.sayHey = function(name){ | ||
if(arguments.length === 0) throw new Error('no name entered'); | ||
return `hey ${name}`; |
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.
Yay string interpolation!
const expect = require('chai').expect; | ||
|
||
describe('Greet Module', function(){ | ||
describe('#sayHey',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.
Great job using # before the name of the method being tested.
}); | ||
}); | ||
describe('#sayBye',function(){ | ||
it('should return see ya later', 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.
Good idea to put a blank line above an it block so you can clearly find where the test begins and separate it from the describe blocks or other it blocks.
No description provided.