Last active
September 7, 2016 13:33
-
-
Save blacksun1/9c1f5c6d1e2a72227d71e96f13f577b8 to your computer and use it in GitHub Desktop.
Lab test for using
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
'use strict'; | |
// Load modules | |
const Lab = require('lab'); | |
// Test shortcuts | |
const lab = exports.lab = Lab.script(); | |
const describe = lab.describe; | |
const it = lab.it; | |
const expect = Lab.assertions.expect; | |
const fail = Lab.assertions.fail; | |
describe('expectation', () => { | |
it('Test should pass but get marked as having a missing expectation', (done) => { | |
expect(true).to.be.false; | |
done(); | |
}); | |
it('should be able to expect', (done) => { | |
expect(true).to.be.true(); | |
done(); | |
}); | |
it('should be able to fail (This test should fail)', (done) => { | |
fail('Should fail'); | |
done(); | |
}); | |
}); |
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
{ | |
"name": "9c1f5c6d1e2a72227d71e96f13f577b8", | |
"version": "1.0.0", | |
"description": "", | |
"main": "brokenTest.js", | |
"scripts": { | |
"test": "lab --lint --assert code 'brokenTest.js'" | |
}, | |
"repository": { | |
"type": "git", | |
"url": "git+ssh://git@gist.github.com/9c1f5c6d1e2a72227d71e96f13f577b8.git" | |
}, | |
"author": { | |
"name": "Simon Bruce", | |
"email": "blacksun1@users.noreply.github.com", | |
"url": "https://blog.blacksun.cx" | |
}, | |
"license": "MIT", | |
"bugs": { | |
"url": "https://gist.github.com/9c1f5c6d1e2a72227d71e96f13f577b8" | |
}, | |
"homepage": "https://gist.github.com/9c1f5c6d1e2a72227d71e96f13f577b8", | |
"devDependencies": { | |
"code": "^3.0.2", | |
"lab": "^11.0.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment