Merge branch 'github-1221' of https://github.com/ksvitkovsky/jasmine into ksvitkovsky-github-1221
- Merges #1412 from @ksvitkovsky - Fixes #1221
This commit is contained in:
8
spec/core/matchers/nothingSpec.js
Normal file
8
spec/core/matchers/nothingSpec.js
Normal file
@@ -0,0 +1,8 @@
|
||||
describe('nothing', function() {
|
||||
it('should pass', function() {
|
||||
var matcher = jasmineUnderTest.matchers.nothing(),
|
||||
result = matcher.compare();
|
||||
|
||||
expect(result.pass).toBe(true);
|
||||
});
|
||||
});
|
||||
20
src/core/matchers/nothing.js
Normal file
20
src/core/matchers/nothing.js
Normal file
@@ -0,0 +1,20 @@
|
||||
getJasmineRequireObj().nothing = function() {
|
||||
/**
|
||||
* {@link expect} nothing explicitly.
|
||||
* @function
|
||||
* @name matchers#nothing
|
||||
* @example
|
||||
* expect().nothing();
|
||||
*/
|
||||
function nothing() {
|
||||
return {
|
||||
compare: function() {
|
||||
return {
|
||||
pass: true
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return nothing;
|
||||
};
|
||||
@@ -1,5 +1,6 @@
|
||||
getJasmineRequireObj().requireMatchers = function(jRequire, j$) {
|
||||
var availableMatchers = [
|
||||
'nothing',
|
||||
'toBe',
|
||||
'toBeCloseTo',
|
||||
'toBeDefined',
|
||||
|
||||
Reference in New Issue
Block a user