Skip to content

Commit

Permalink
chore: add chai and dirty-chai for better test assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
nknapp committed Nov 15, 2019
1 parent c02b05f commit 93e284e
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 1 deletion.
61 changes: 60 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
"babel-loader": "^5.0.0",
"babel-runtime": "^5.1.10",
"benchmark": "~1.0",
"chai": "^4.2.0",
"dirty-chai": "^2.0.1",
"dtslint": "^0.5.5",
"dustjs-linkedin": "^2.0.2",
"eco": "~1.1.0-rc-3",
Expand Down
6 changes: 6 additions & 0 deletions spec/env/node.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
require('./common');

var chai = require('chai');
var dirtyChai = require('dirty-chai');

chai.use(dirtyChai);
global.expect = chai.expect;

global.Handlebars = require('../../lib');

global.CompilerContext = {
Expand Down
2 changes: 2 additions & 0 deletions spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
}
</script>
<script src="/node_modules/mocha/mocha.js"></script>
<script src="/node_modules/chai/chai.js"></script>
<script src="/node_modules/dirty-chai/lib/dirty-chai.js"></script>
<script>
mocha.setup('bdd');
</script>
Expand Down

0 comments on commit 93e284e

Please sign in to comment.