X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/a398f2a96740ebe6dd60559d90e74c648e7009af..35f6a8ff4b988a56a32d798a2854ccf1dac4e840:/tests/main.js diff --git a/tests/main.js b/tests/main.js index 8e17cdc..87eb6b2 100644 --- a/tests/main.js +++ b/tests/main.js @@ -1,28 +1,48 @@ (function() { - mocha.setup('tdd'); + mocha.setup('bdd'); var tests = Object.keys(window.__karma__.files).filter(function (file) { return /\.test\.js$/.test(file); }); require({ - baseUrl: '/base/', + baseUrl: '/base/src/editor', deps: tests, callback: window.__karma__.start, + + paths: { + 'fnpjs': '../fnpjs', + 'libs': '../../libs' + }, + + map: { + '*': + { + 'libs/jquery': '../../libs/jquery-1.9.1.min', + 'libs/underscore': '../../libs/underscore-min', + 'libs/bootstrap': '../../libs/bootstrap/js/bootstrap.min', + 'libs/backbone': '../../libs/backbone-min', + 'libs/sinon': '../../libs/sinon-1.7.3' + } + }, + shim: { - 'libs/jquery-1.9.1.min': { + '../../libs/jquery-1.9.1.min': { exports: '$', }, - 'libs/underscore-min': { + '../../libs/underscore-min': { exports: '_' }, - 'libs/bootstrap/js/bootstrap.min': { - deps: ['libs/jquery-1.9.1.min'] + '../../libs/bootstrap/js/bootstrap.min': { + deps: ['libs/jquery'] }, - 'libs/backbone-min': { + '../../libs/backbone-min': { exports: 'Backbone', - deps: ['libs/jquery-1.9.1.min', 'libs/underscore-min'] + deps: ['libs/jquery', 'libs/underscore'] + }, + '../../libs/sinon-1.7.3': { + exports: 'sinon' } } });