Open
Conversation
jalleng
reviewed
Feb 24, 2017
index.js
Outdated
|
|
||
| const greet = ('./lib/greet.js'); | ||
|
|
||
| greet.sayHi('sugey') |
There was a problem hiding this comment.
This is not a function in your greet.js file so you can't call it here.
jalleng
reviewed
Feb 24, 2017
index.js
Outdated
| @@ -0,0 +1,6 @@ | |||
| 'use strict' | |||
|
|
|||
| const greet = ('./lib/greet.js'); | |||
There was a problem hiding this comment.
Good job requiring in your greet.js file.
jalleng
reviewed
Feb 24, 2017
| it('should throw a missing name error', function() { | ||
| var result = greet.sayHey; | ||
| expect(result).to.throw(Error); | ||
| }); |
jalleng
reviewed
Feb 24, 2017
test/test.js
Outdated
| it('should return hey sugey!', function() { | ||
| var result = greet.sayHey('sugey'); | ||
| expect(greet).to.have.property('sayHey'); | ||
|
|
jalleng
reviewed
Feb 24, 2017
test/test.js
Outdated
|
|
||
| describe('#sayBye', function() { | ||
| it('should return see ya later!', function() { | ||
|
|
There was a problem hiding this comment.
This test isn't quite testing anything.
jalleng
reviewed
Feb 27, 2017
index.js
Outdated
| @@ -0,0 +1,6 @@ | |||
| 'use strict' | |||
|
|
|||
| const greet = require('../lib/greet.js'); | |||
jalleng
reviewed
Feb 27, 2017
| const greet = require('../lib/greet.js'); | ||
|
|
||
| greet.sayHey(''); | ||
| greet.sayBye(''); |
There was a problem hiding this comment.
Good job calling your function from your index.js.
jalleng
reviewed
Feb 27, 2017
| const expect = require('chai').expect; | ||
|
|
||
| describe('Great module', function() { | ||
| describe('#sayHey', function(sayHey) { |
There was a problem hiding this comment.
You don't need to pass in a parameter here.
jalleng
reviewed
Feb 27, 2017
| expect(greet).to.have.property('sayBye'); | ||
| expect(result).to.equal('see ya later sugey!'); | ||
| }); | ||
| }); |
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.
all tests work