Matchers & Matchers specs now broken up into individual files. There is now a requireMatchers jasmineRequire function to attach matchers properly.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
getJasmineRequireObj().requireMatchers = function(jRequire) {
|
||||
var availableMatchers = [
|
||||
"toBe",
|
||||
"toBeCloseTo",
|
||||
"toBeDefined",
|
||||
"toBeFalsy",
|
||||
"toBeGreaterThan",
|
||||
"toBeLessThan",
|
||||
"toBeNaN",
|
||||
"toBeNull",
|
||||
"toBeTruthy",
|
||||
"toBeUndefined",
|
||||
"toContain",
|
||||
"toEqual",
|
||||
"toHaveBeenCalled",
|
||||
"toHaveBeenCalledWith",
|
||||
"toMatch",
|
||||
"toThrow"
|
||||
],
|
||||
matchers = {};
|
||||
|
||||
for (var i = 0; i < availableMatchers.length; i++) {
|
||||
var name = availableMatchers[i];
|
||||
matchers[name] = jRequire[name]();
|
||||
}
|
||||
|
||||
return matchers;
|
||||
};
|
||||
Reference in New Issue
Block a user