[API] Fix failing specs

This commit is contained in:
Victor Woeltjen 2016-09-30 17:05:40 -07:00
parent ce6c6385c3
commit f8819ee946
2 changed files with 4 additions and 0 deletions

View File

@ -37,9 +37,11 @@ module.exports = function(config) {
{pattern: 'bower_components/**/*.js', included: false}, {pattern: 'bower_components/**/*.js', included: false},
{pattern: 'src/**/*.js', included: false}, {pattern: 'src/**/*.js', included: false},
{pattern: 'example/**/*.js', included: false}, {pattern: 'example/**/*.js', included: false},
{pattern: 'example/**/*.json', included: false},
{pattern: 'platform/**/*.js', included: false}, {pattern: 'platform/**/*.js', included: false},
{pattern: 'warp/**/*.js', included: false}, {pattern: 'warp/**/*.js', included: false},
{pattern: 'platform/**/*.html', included: false}, {pattern: 'platform/**/*.html', included: false},
{pattern: 'src/**/*.html', included: false},
'test-main.js' 'test-main.js'
], ],

View File

@ -32,6 +32,7 @@ define(function () {
throw new Error('Cannot register bundle with duplicate path', path); throw new Error('Cannot register bundle with duplicate path', path);
} }
this.knownBundles[path] = definition; this.knownBundles[path] = definition;
this.enable(path);
}; };
BundleRegistry.prototype.enable = function (path) { BundleRegistry.prototype.enable = function (path) {
@ -45,6 +46,7 @@ define(function () {
if (!this.bundles[path]) { if (!this.bundles[path]) {
throw new Error('Tried to disable inactive bundle ' + path); throw new Error('Tried to disable inactive bundle ' + path);
} }
delete this.bundles[path];
}; };
BundleRegistry.prototype.contains = function (path) { BundleRegistry.prototype.contains = function (path) {