Assets service spec for testing lib loading
This commit is contained in:
@@ -7,37 +7,38 @@ module.exports = function(karma) {
|
|||||||
|
|
||||||
// list of files / patterns to load in the browser
|
// list of files / patterns to load in the browser
|
||||||
files: [
|
files: [
|
||||||
'lib/jquery/jquery-2.0.3.min.js',
|
'lib/jquery/jquery-2.0.3.min.js',
|
||||||
|
'lib/angular/1.1.5/angular.js',
|
||||||
|
'lib/angular/1.1.5/angular-cookies.min.js',
|
||||||
|
'lib/angular/1.1.5/angular-mocks.js',
|
||||||
|
|
||||||
'lib/angular/1.1.5/angular.js',
|
/*
|
||||||
'lib/angular/1.1.5/angular-cookies.min.js',
|
For angular 1.2:
|
||||||
'lib/angular/1.1.5/angular-mocks.js',
|
'lib/angular/1.2/angular.js',
|
||||||
|
'lib/angular/1.2/angular-route.min.js',
|
||||||
|
'lib/angular/1.2/angular-touch.min.js',
|
||||||
|
'lib/angular/1.2/angular-cookies.min.js',
|
||||||
|
'lib/angular/1.2/angular-animate.min.js',
|
||||||
|
'lib/angular/1.2/angular-mocks.js',*/
|
||||||
|
|
||||||
|
|
||||||
/*
|
'lib/underscore/underscore.js',
|
||||||
For angular 1.2:
|
'lib/umbraco/Extensions.js',
|
||||||
'lib/angular/1.2/angular.js',
|
'lib/yepnope/yepnope.min.js',
|
||||||
'lib/angular/1.2/angular-route.min.js',
|
|
||||||
'lib/angular/1.2/angular-touch.min.js',
|
|
||||||
'lib/angular/1.2/angular-cookies.min.js',
|
|
||||||
'lib/angular/1.2/angular-animate.min.js',
|
|
||||||
'lib/angular/1.2/angular-mocks.js',
|
|
||||||
*/
|
|
||||||
|
|
||||||
'lib/underscore/underscore.js',
|
'test/config/app.unit.js',
|
||||||
'lib/umbraco/Extensions.js',
|
'src/common/mocks/umbraco.servervariables.js',
|
||||||
'lib/yepnope/yepnope.min.js',
|
|
||||||
|
|
||||||
'test/config/app.unit.js',
|
'src/common/directives/*.js',
|
||||||
'src/common/mocks/umbraco.servervariables.js',
|
'src/common/filters/*.js',
|
||||||
|
'src/common/services/*.js',
|
||||||
|
'src/common/security/*.js',
|
||||||
|
'src/common/resources/*.js',
|
||||||
|
'src/common/mocks/resources/*.js',
|
||||||
|
'src/views/**/*.controller.js',
|
||||||
|
'test/unit/**/*.spec.js',
|
||||||
|
|
||||||
'src/common/directives/*.js',
|
{pattern: 'lib/umbraco/*.js', watched: true, served: true}
|
||||||
'src/common/filters/*.js',
|
|
||||||
'src/common/services/*.js',
|
|
||||||
'src/common/security/*.js',
|
|
||||||
'src/common/resources/*.js',
|
|
||||||
'src/common/mocks/resources/*.js',
|
|
||||||
'src/views/**/*.controller.js',
|
|
||||||
'test/unit/**/*.spec.js'
|
|
||||||
],
|
],
|
||||||
|
|
||||||
// list of files to exclude
|
// list of files to exclude
|
||||||
@@ -63,7 +64,7 @@ module.exports = function(karma) {
|
|||||||
// level of logging
|
// level of logging
|
||||||
// possible values: karma.LOG_DISABLE || karma.LOG_ERROR || karma.LOG_WARN || karma.LOG_INFO || karma.LOG_DEBUG
|
// possible values: karma.LOG_DISABLE || karma.LOG_ERROR || karma.LOG_WARN || karma.LOG_INFO || karma.LOG_DEBUG
|
||||||
// CLI --log-level debug
|
// CLI --log-level debug
|
||||||
logLevel: karma.LOG_INFO,
|
logLevel: karma.LOG_DEBUG,
|
||||||
|
|
||||||
// enable / disable watching file and executing tests whenever any file changes
|
// enable / disable watching file and executing tests whenever any file changes
|
||||||
// CLI --auto-watch --no-auto-watch
|
// CLI --auto-watch --no-auto-watch
|
||||||
|
|||||||
@@ -7,12 +7,10 @@ describe('keyboard service tests', function () {
|
|||||||
$rootScope = $injector.get('$rootScope');
|
$rootScope = $injector.get('$rootScope');
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe('Loading js assets', function () {
|
describe('Loading js assets', function () {
|
||||||
|
|
||||||
it('Loads a javascript file', function () {
|
it('Loads a javascript file', function () {
|
||||||
assetsService.loadJs("NamespaceManager.js").then(function(){
|
assetsService.loadJs("lib/umbraco/NamespaceManager.js").then(function(){
|
||||||
console.log("loaded");
|
console.log("loaded");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user