Split boot.js in two to allow the env to be configured in between
This is mainly intended to support jasmine-browser-runner, which will load a script that configures the env in between the two boot files (boot0.js and boot1.js). The single-file boot.js is retained for now but will be removed in a future release.
This commit is contained in:
@@ -60,6 +60,31 @@ describe('Env', function() {
|
||||
);
|
||||
});
|
||||
|
||||
it('ignores configuration properties that are present but undefined', function() {
|
||||
var initialConfig = {
|
||||
random: true,
|
||||
seed: '123',
|
||||
failFast: true,
|
||||
failSpecWithNoExpectations: true,
|
||||
oneFailurePerSpec: true,
|
||||
hideDisabled: true
|
||||
};
|
||||
env.configure(initialConfig);
|
||||
|
||||
env.configure({
|
||||
random: undefined,
|
||||
seed: undefined,
|
||||
failFast: undefined,
|
||||
failSpecWithNoExpectations: undefined,
|
||||
oneFailurePerSpec: undefined,
|
||||
hideDisabled: undefined
|
||||
});
|
||||
|
||||
expect(env.configuration()).toEqual(
|
||||
jasmine.objectContaining(initialConfig)
|
||||
);
|
||||
});
|
||||
|
||||
describe('promise library', function() {
|
||||
it('can be configured without a custom library', function() {
|
||||
env.configure({});
|
||||
|
||||
@@ -75,7 +75,7 @@ describe('npm package', function() {
|
||||
});
|
||||
|
||||
it('has bootFiles', function() {
|
||||
expect(this.packagedCore.files.bootFiles).toEqual(['boot.js']);
|
||||
expect(this.packagedCore.files.bootFiles).toEqual(['boot0.js', 'boot1.js']);
|
||||
expect(this.packagedCore.files.nodeBootFiles).toEqual(['node_boot.js']);
|
||||
|
||||
var packagedCore = this.packagedCore;
|
||||
@@ -83,6 +83,10 @@ describe('npm package', function() {
|
||||
expect(fileName).toExistInPath(packagedCore.files.bootDir);
|
||||
});
|
||||
|
||||
// For backwards compatibility, boot.js should be packaged even though
|
||||
// it is no longer in bootFiles.
|
||||
expect('boot.js').toExistInPath(packagedCore.files.bootDir);
|
||||
|
||||
var packagedCore = this.packagedCore;
|
||||
this.packagedCore.files.nodeBootFiles.forEach(function(fileName) {
|
||||
expect(fileName).toExistInPath(packagedCore.files.bootDir);
|
||||
|
||||
Reference in New Issue
Block a user