Last active
October 16, 2015 10:19
-
-
Save fliedonion/b85b294acc4aac85c53b to your computer and use it in GitHub Desktop.
mocha, babel, Immutable.js
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
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title></title> | |
<link rel="stylesheet" href="bower_components/mocha/mocha.css"/> | |
<script src="bower_components/mocha/mocha.js"></script> | |
<script src="node_modules/babel-core/browser.js"></script> | |
<script src="bower_components/chai/chai.js"></script> | |
<script src="bower_components/lodash/lodash.js"></script> | |
<script src="bower_components/immutable/dist/immutable.js"></script> | |
<!-- | |
bower | |
"chai": "~3.3.0", | |
"mocha": "~2.3.3", | |
"immutable": "~3.7.5", | |
"lodash": "~3.10.1" | |
npm | |
"babel-core": "^5.8.25" | |
--> | |
<script type="text/babel"> | |
var expect = chai.expect; | |
(() => { | |
mocha.setup('bdd'); | |
describe('mocha and immutable works on babel ', () => { | |
it('should be work successflly mocha.run()', ()=> { | |
expect(1).to.equal(1) | |
expect(true).to.be.true | |
}) | |
it('should be work Immutable.Maps\'s isMap method', ()=>{ | |
const item = {title: 'this is title', value: 2015} | |
let map = Immutable.Map(item) | |
expect(Immutable.Map.isMap(map)).to.be.true; | |
}) | |
}) | |
mocha.run() | |
})() | |
</script> | |
</head> | |
<body> | |
<div id="mocha"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment