Created
July 3, 2015 09:48
-
-
Save poliveira89/c84380c3f0cf4467a460 to your computer and use it in GitHub Desktop.
hapijs testing with lab
This file contains 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
$ lab | |
. | |
1 tests complete | |
Test duration: 28 ms | |
No global variable leaks detected |
This file contains 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
var Code = require('code'); // assertion library | |
var Lab = require('lab'); | |
var lab = exports.lab = Lab.script(); | |
lab.experiment('test base', function() { | |
lab.test('something', function(done) { | |
var hello = 'hello'; | |
Code.expect(hello).to.equal('hello'); | |
done(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment