Skip to content
Myr

Upgraded JSpec

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by visionmedia · committed by visionmedia · parent 9cb2645 · Browse files · 1 file+5 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−5 removed

  • tests:+5 added−5 removed

1 file+5 added−5 removed

modified:spec/lib/jspec.js+5 added-5 removed
2 unmodified lines
34;(function(){56 JSpec = {7 version : '3.1.0',7 version : '3.2.1',8 assert : true,9 cache : {},10 suites : [],11 modules : [],
1033 unmodified lines
1045 * @api public1046 */10471048 expect : function(actual) {1049 assert = function(matcher, args, negate) {1049 function assert(matcher, args, negate) {1050 var expected = toArray(args, 1)1051 matcher.negate = negate 1052 assertion = new JSpec.Assertion(matcher, actual, expected, negate)1053 hook('beforeAssertion', assertion)
1 unmodified line
1055 else JSpec.currentSpec.assertions.push(assertion.run().report()), hook('afterAssertion', assertion)1056 return assertion.result1057 }1058 1059 to = function(matcher) {1059 function to(matcher) {1060 return assert(matcher, arguments, false)1061 }1062 1063 not_to = function(matcher) {1063 function not_to(matcher) {1064 return assert(matcher, arguments, true)1065 }1066 1067 return {
623 unmodified lines
1691 case String: 1692 case Number:1693 case RegExp:1694 case Function:1695 state = actual.toString().match(arg.toString())1695 state = actual.toString().indexOf(arg) !== -11696 break1697 1698 case Object:1699 state = arg in actual
74 unmodified lines