Commit 814755ed authored by Stas SUȘCOV's avatar Stas SUȘCOV

Replace mocha and chai with jasmine.

parent 7b280ae7
......@@ -5,6 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>ember.js + require.js • TodoMVC</title>
<link rel="stylesheet" href="../../assets/base.css">
<link rel="stylesheet" href="../../assets/jasmine/jasmine.css">
<link rel="stylesheet" href="css/app.css">
<!--[if IE]>
<script src="../../assets/ie.js"></script>
......
......@@ -3,11 +3,11 @@ require.config({
baseUrl: 'js/',
paths: {
jquery: '../../../assets/jquery.min',
ember: 'http://cloud.github.com/downloads/emberjs/ember.js/ember-latest.min',
// ember: 'lib/ember-0.9.8.1.min',
// ember: 'http://cloud.github.com/downloads/emberjs/ember.js/ember-latest.min',
ember: 'lib/ember-latest',
text: 'lib/require/text',
mocha: 'lib/mocha',
chai: 'lib/chai'
jasmine: '../../../assets/jasmine/jasmine',
jasmine_html: '../../../assets/jasmine/jasmine-html'
}
});
......
define( 'app/specs/helper', [ 'chai', 'mocha' ],
define( 'app/specs/helper', [ 'jasmine', 'jasmine_html' ],
/**
* Specs Runner
*/
function( chai ) {
// Create placeholder for mocha output
// TODO: Make this shit look better and inside body
$( document.body ).before( '<div id="mocha"></div>' );
// Setup mocha and expose chai matchers
window.expect = chai.expect;
mocha.setup('bdd');
function() {
// Load testsuite
require([
'app/specs/models/store',
'app/specs/views/basic_acceptance',
'app/specs/controllers/todos'
'app/specs/todoMVC',
], function() {
mocha.run().globals( [ '$', 'Ember', 'Todos' ] );
var jasmineEnv = jasmine.getEnv();
var htmlReporter = new jasmine.HtmlReporter();
jasmineEnv.addReporter( htmlReporter );
jasmineEnv.execute();
});
}
);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment