Skip to content

Commit

Permalink
Fixed a few minor bugs and added the ability to run expectThat.jasmin…
Browse files Browse the repository at this point in the history
…e-node from a command line.
  • Loading branch information
dmohl committed Jan 15, 2012
1 parent c2d7eaf commit 0fc43dd
Show file tree
Hide file tree
Showing 28 changed files with 358 additions and 114 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

127 changes: 127 additions & 0 deletions example/Jasmine-node/node_modules/expectThat.jasmine-node/lib/cli.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions lib/expectThat.jasmine.js
Expand Up @@ -2,7 +2,7 @@ var expectThatApi, root;
root = typeof exports !== "undefined" && exports !== null ? exports : window;
expectThatApi = (function(expectThatApi) {
return {
version: "0.2.1.1",
version: "0.2.2.2",
init: function(assertProvider) {
var _this;
_this = this;
Expand Down Expand Up @@ -111,7 +111,7 @@ expectThatApi = (function(expectThatApi) {
if (typeof desc === "function" && typeof fn !== "function") {
fn = desc;
description = fn.toString().match(/^[^\{]*\{((.*\s*)*)\}/m)[1];
description = description.replace(/(\^\s+|\s)+$/g, "").replace(/\);/g, "").replace(/[(\^(?)]/g, " ").replace(/.should/g, " should").replace(/return/g, " ").replace(/shouldnt/g, "shouldn't").replace(/void 0/g, "null").replace(/!= null/g, "").replace(/typeof null !== "undefined" && null !== null/g, "undefined");
description = description.replace(/\);/g, "").replace(/[(\^(?)]/g, " ").replace(/.should/g, " should").replace(/return/g, " ").replace(/shouldnt/g, "shouldn't").replace(/void 0/g, "null").replace(/!= null/g, "").replace(/typeof null !== "undefined" && null !== null/g, "undefined").replace(/^\s\s*/, '').replace(/\s\s*$/, '');
} else {
description = desc;
}
Expand Down Expand Up @@ -228,6 +228,7 @@ expectThatApi = (function(expectThatApi) {
exports.to = expectThatApi.api.to;
exports.throwException = expectThatApi.api.throwException;
exports.expectThat = expectThatApi.expectThat;
exports.expectThatApi = expectThatApi;
expectThatApi.util.extend(exports, expectThatApi.api.extendedMatchers);
return this;
})(expectThatApi || (expectThatApi = {}), root);
Binary file modified lib/expectThat.jasmine.min.gz.js
Binary file not shown.

0 comments on commit 0fc43dd

Please sign in to comment.