- jasmine-core can now self test with the jasmine-npm - Add node examples files - Add node_boot.js for node environment - Move jasmine-core npm packaging to .npmignore - removing src_dir and src_files from jasmine.json b/c jasmine-npm does not support requiring source files automatically.
72 lines
1.5 KiB
JavaScript
72 lines
1.5 KiB
JavaScript
module.exports = function(jasmineRequire) {
|
|
var jasmine = jasmineRequire.core(jasmineRequire);
|
|
|
|
var consoleFns = require('../console/console.js');
|
|
consoleFns.console(consoleFns, jasmine);
|
|
|
|
var env = jasmine.getEnv();
|
|
|
|
var jasmineInterface = {
|
|
describe: function(description, specDefinitions) {
|
|
return env.describe(description, specDefinitions);
|
|
},
|
|
|
|
xdescribe: function(description, specDefinitions) {
|
|
return env.xdescribe(description, specDefinitions);
|
|
},
|
|
|
|
it: function(desc, func) {
|
|
return env.it(desc, func);
|
|
},
|
|
|
|
xit: function(desc, func) {
|
|
return env.xit(desc, func);
|
|
},
|
|
|
|
beforeEach: function(beforeEachFunction) {
|
|
return env.beforeEach(beforeEachFunction);
|
|
},
|
|
|
|
afterEach: function(afterEachFunction) {
|
|
return env.afterEach(afterEachFunction);
|
|
},
|
|
|
|
expect: function(actual) {
|
|
return env.expect(actual);
|
|
},
|
|
|
|
spyOn: function(obj, methodName) {
|
|
return env.spyOn(obj, methodName);
|
|
},
|
|
|
|
jsApiReporter: new jasmine.JsApiReporter({
|
|
timer: new jasmine.Timer()
|
|
}),
|
|
|
|
|
|
jasmine: jasmine
|
|
};
|
|
|
|
extend(global, jasmineInterface);
|
|
|
|
jasmine.addCustomEqualityTester = function(tester) {
|
|
env.addCustomEqualityTester(tester);
|
|
};
|
|
|
|
jasmine.addMatchers = function(matchers) {
|
|
return env.addMatchers(matchers);
|
|
};
|
|
|
|
jasmine.clock = function() {
|
|
return env.clock;
|
|
};
|
|
|
|
function extend(destination, source) {
|
|
for (var property in source) destination[property] = source[property];
|
|
return destination;
|
|
}
|
|
|
|
|
|
return jasmine;
|
|
};
|