X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/412e60ded1457ec0f408e2234c9dd60122929bac..2613031b220940f47a67d3536b5cc5581fbf155a:/tests/main.js?ds=sidebyside diff --git a/tests/main.js b/tests/main.js index 16154b7..c3da0df 100644 --- a/tests/main.js +++ b/tests/main.js @@ -3,35 +3,49 @@ mocha.setup('bdd'); var tests = Object.keys(window.__karma__.files).filter(function (file) { - return /\.test\.js$/.test(file); + return (/\.test\.js$/).test(file); }); require({ - baseUrl: '/base/', + 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': { + '../../libs/jquery-1.9.1.min': { exports: '$', }, - 'libs/underscore': { + '../../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': { + '../../libs/backbone-min': { exports: 'Backbone', - deps: ['libs/jquery-1.9.1.min', 'libs/underscore'] + deps: ['libs/jquery', 'libs/underscore'] }, - 'libs/sinon-1.7.3': { + '../../libs/sinon-1.7.3': { exports: 'sinon' } - }, - map: { - '*': { - 'libs/sinon': 'libs/sinon-1.7.3' - } } });