Skip to content

Commit 63e20db

Browse files
committed
Allow karma to test with development origin
Use '../angular-schema-form-bootstrap/dist/angular-schema-form-bootstrap.js' instead of local dist folder for testing if it is available.
1 parent 9c7bccc commit 63e20db

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

karma.conf.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
// Karma configuration
2-
// Generated on Fri Feb 07 2014 08:31:06 GMT+0100 (CET)
2+
3+
var fs = require('fs');
4+
var path = require('path');
5+
var origin = fs.existsSync(path.resolve(__dirname, '../angular-schema-form-bootstrap/dist/angular-schema-form-bootstrap.js'));
6+
var include = (origin)
7+
? '../angular-schema-form-bootstrap/dist/angular-schema-form-bootstrap.js'
8+
: 'dist/angular-schema-form-bootstrap.js';
9+
console.log("Karma bootstrap:" + origin);
10+
311
module.exports = function(config) {
412
config.set({
513
// base path, that will be used to resolve files and exclude
@@ -16,8 +24,9 @@ module.exports = function(config) {
1624
'test/lib/angular-mocks.js',
1725
'bower_components/tv4/tv4.js',
1826
'dist/angular-schema-form.js',
19-
'dist/angular-schema-form-bootstrap.js',
27+
include,
2028
'src/**/*.spec.js'
29+
//'src/**/sf-schema.directive.spec.js'
2130
],
2231

2332
// list of files to exclude

0 commit comments

Comments
 (0)