Cleaning up explicit dependencies
This commit is contained in:
@@ -52,12 +52,12 @@ getJasmineRequireObj().core = function(jRequire) {
|
||||
j$.Suite = jRequire.Suite();
|
||||
j$.version = jRequire.version();
|
||||
|
||||
j$.matchers = jRequire.requireMatchers(jRequire);
|
||||
j$.matchers = jRequire.requireMatchers(jRequire, j$);
|
||||
|
||||
return j$;
|
||||
};
|
||||
|
||||
getJasmineRequireObj().requireMatchers = function(jRequire) {
|
||||
getJasmineRequireObj().requireMatchers = function(jRequire, j$) {
|
||||
var availableMatchers = [
|
||||
"toBe",
|
||||
"toBeCloseTo",
|
||||
@@ -81,7 +81,7 @@ getJasmineRequireObj().requireMatchers = function(jRequire) {
|
||||
|
||||
for (var i = 0; i < availableMatchers.length; i++) {
|
||||
var name = availableMatchers[i];
|
||||
matchers[name] = jRequire[name]();
|
||||
matchers[name] = jRequire[name](j$);
|
||||
}
|
||||
|
||||
return matchers;
|
||||
@@ -735,6 +735,10 @@ getJasmineRequireObj().Any = function() {
|
||||
if (this.expectedObject == Object) {
|
||||
return typeof other == 'object';
|
||||
}
|
||||
|
||||
if (this.expectedObject == Boolean) {
|
||||
return typeof other == 'boolean';
|
||||
}
|
||||
|
||||
return other instanceof this.expectedObject;
|
||||
};
|
||||
@@ -1827,7 +1831,7 @@ getJasmineRequireObj().toBeLessThan = function() {
|
||||
|
||||
return toBeLessThan;
|
||||
};
|
||||
getJasmineRequireObj().toBeNaN = function() {
|
||||
getJasmineRequireObj().toBeNaN = function(j$) {
|
||||
|
||||
function toBeNaN() {
|
||||
return {
|
||||
@@ -1933,7 +1937,7 @@ getJasmineRequireObj().toEqual = function() {
|
||||
return toEqual;
|
||||
};
|
||||
|
||||
getJasmineRequireObj().toHaveBeenCalled = function() {
|
||||
getJasmineRequireObj().toHaveBeenCalled = function(j$) {
|
||||
|
||||
function toHaveBeenCalled() {
|
||||
return {
|
||||
@@ -1962,7 +1966,7 @@ getJasmineRequireObj().toHaveBeenCalled = function() {
|
||||
return toHaveBeenCalled;
|
||||
};
|
||||
|
||||
getJasmineRequireObj().toHaveBeenCalledWith = function() {
|
||||
getJasmineRequireObj().toHaveBeenCalledWith = function(j$) {
|
||||
|
||||
function toHaveBeenCalledWith(util) {
|
||||
return {
|
||||
@@ -2008,7 +2012,7 @@ getJasmineRequireObj().toMatch = function() {
|
||||
return toMatch;
|
||||
};
|
||||
|
||||
getJasmineRequireObj().toThrow = function() {
|
||||
getJasmineRequireObj().toThrow = function(j$) {
|
||||
|
||||
function toThrow(util) {
|
||||
return {
|
||||
@@ -2055,7 +2059,7 @@ getJasmineRequireObj().toThrow = function() {
|
||||
return toThrow;
|
||||
};
|
||||
|
||||
getJasmineRequireObj().toThrowError = function() {
|
||||
getJasmineRequireObj().toThrowError = function(j$) {
|
||||
function toThrowError (util) {
|
||||
return {
|
||||
compare: function(actual) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
getJasmineRequireObj().requireMatchers = function(jRequire) {
|
||||
getJasmineRequireObj().requireMatchers = function(jRequire, j$) {
|
||||
var availableMatchers = [
|
||||
"toBe",
|
||||
"toBeCloseTo",
|
||||
@@ -22,7 +22,7 @@ getJasmineRequireObj().requireMatchers = function(jRequire) {
|
||||
|
||||
for (var i = 0; i < availableMatchers.length; i++) {
|
||||
var name = availableMatchers[i];
|
||||
matchers[name] = jRequire[name]();
|
||||
matchers[name] = jRequire[name](j$);
|
||||
}
|
||||
|
||||
return matchers;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
getJasmineRequireObj().toBeNaN = function() {
|
||||
getJasmineRequireObj().toBeNaN = function(j$) {
|
||||
|
||||
function toBeNaN() {
|
||||
return {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
getJasmineRequireObj().toHaveBeenCalled = function() {
|
||||
getJasmineRequireObj().toHaveBeenCalled = function(j$) {
|
||||
|
||||
function toHaveBeenCalled() {
|
||||
return {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
getJasmineRequireObj().toHaveBeenCalledWith = function() {
|
||||
getJasmineRequireObj().toHaveBeenCalledWith = function(j$) {
|
||||
|
||||
function toHaveBeenCalledWith(util) {
|
||||
return {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
getJasmineRequireObj().toThrow = function() {
|
||||
getJasmineRequireObj().toThrow = function(j$) {
|
||||
|
||||
function toThrow(util) {
|
||||
return {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
getJasmineRequireObj().toThrowError = function() {
|
||||
getJasmineRequireObj().toThrowError = function(j$) {
|
||||
function toThrowError (util) {
|
||||
return {
|
||||
compare: function(actual) {
|
||||
|
||||
@@ -30,7 +30,7 @@ getJasmineRequireObj().core = function(jRequire) {
|
||||
j$.Suite = jRequire.Suite();
|
||||
j$.version = jRequire.version();
|
||||
|
||||
j$.matchers = jRequire.requireMatchers(jRequire);
|
||||
j$.matchers = jRequire.requireMatchers(jRequire, j$);
|
||||
|
||||
return j$;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user