X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/540ab2ebda6121a52a15f82e531ef8ba558024b1..71b7ba4d1d17adc39165914016fa892671cc4316:/tests/main.js diff --git a/tests/main.js b/tests/main.js index 8a093d9..c3da0df 100644 --- a/tests/main.js +++ b/tests/main.js @@ -1,15 +1,52 @@ -(function() { - - mocha.setup('tdd'); - - var tests = Object.keys(window.__karma__.files).filter(function (file) { - return /\.test\.js$/.test(file); - }); - - require({ - baseUrl: '/base/', - deps: tests, - callback: window.__karma__.start - }); - +(function() { + + mocha.setup('bdd'); + + var tests = Object.keys(window.__karma__.files).filter(function (file) { + return (/\.test\.js$/).test(file); + }); + + require({ + baseUrl: '/base/src/editor', + deps: tests, + callback: window.__karma__.start, + + paths: { + 'fnpjs': '../fnpjs', + 'libs': '../../libs', + 'smartxml': '../smartxml', + 'wlxml': '../wlxml' + }, + + 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': { + exports: '$', + }, + '../../libs/underscore-min': { + exports: '_' + }, + '../../libs/bootstrap/js/bootstrap.min': { + deps: ['libs/jquery'] + }, + '../../libs/backbone-min': { + exports: 'Backbone', + deps: ['libs/jquery', 'libs/underscore'] + }, + '../../libs/sinon-1.7.3': { + exports: 'sinon' + } + } + }); + })(); \ No newline at end of file