Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

noahgribbin
Copy link

No description provided.

gulp.watch(['**/*.js', '!node_modules/**'], ['lint', 'test']);
});

gulp.task('default', ['dev']);

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();

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}`;

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(){

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(){

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants