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

Replace mocha and chai with jasmine.

parent 7b280ae7
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>ember.js + require.js • TodoMVC</title> <title>ember.js + require.js • TodoMVC</title>
<link rel="stylesheet" href="../../assets/base.css"> <link rel="stylesheet" href="../../assets/base.css">
<link rel="stylesheet" href="../../assets/jasmine/jasmine.css">
<link rel="stylesheet" href="css/app.css"> <link rel="stylesheet" href="css/app.css">
<!--[if IE]> <!--[if IE]>
<script src="../../assets/ie.js"></script> <script src="../../assets/ie.js"></script>
......
...@@ -3,11 +3,11 @@ require.config({ ...@@ -3,11 +3,11 @@ require.config({
baseUrl: 'js/', baseUrl: 'js/',
paths: { paths: {
jquery: '../../../assets/jquery.min', jquery: '../../../assets/jquery.min',
ember: 'http://cloud.github.com/downloads/emberjs/ember.js/ember-latest.min', // ember: 'http://cloud.github.com/downloads/emberjs/ember.js/ember-latest.min',
// ember: 'lib/ember-0.9.8.1.min', ember: 'lib/ember-latest',
text: 'lib/require/text', text: 'lib/require/text',
mocha: 'lib/mocha', jasmine: '../../../assets/jasmine/jasmine',
chai: 'lib/chai' jasmine_html: '../../../assets/jasmine/jasmine-html'
} }
}); });
......
define( 'app/specs/helper', [ 'chai', 'mocha' ], define( 'app/specs/helper', [ 'jasmine', 'jasmine_html' ],
/** /**
* Specs Runner * Specs Runner
*/ */
function( chai ) { function() {
// 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');
// Load testsuite // Load testsuite
require([ require([
'app/specs/models/store', 'app/specs/todoMVC',
'app/specs/views/basic_acceptance',
'app/specs/controllers/todos'
], function() { ], 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