Skip to content

Commit

Permalink
Merge branch 'github-1221' of https://github.com/ksvitkovsky/jasmine
Browse files Browse the repository at this point in the history
…into ksvitkovsky-github-1221

- Merges #1412 from @ksvitkovsky
- Fixes #1221
  • Loading branch information
Gregg Van Hove committed Aug 10, 2017
2 parents 2588b44 + e7049d3 commit 1414281
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/core/matchers/nothingSpec.js
Original file line number Diff line number Diff line change
@@ -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 changes: 20 additions & 0 deletions src/core/matchers/nothing.js
Original file line number Diff line number Diff line change
@@ -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 change: 1 addition & 0 deletions src/core/matchers/requireMatchers.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
getJasmineRequireObj().requireMatchers = function(jRequire, j$) {
var availableMatchers = [
'nothing',
'toBe',
'toBeCloseTo',
'toBeDefined',
Expand Down

0 comments on commit 1414281

Please sign in to comment.