Permalink
Browse files

Merge branch 'old_tests' of github.com:drewlesueur/drews-mixins into …

…old_tests
  • Loading branch information...
2 parents 406144d + 272df1a commit 56327ad670451d182a03a8521551a15f065c828e @drewlesueur committed Jan 4, 2012
Showing with 303 additions and 313 deletions.
  1. +36 −106 drews-mixins.js
  2. +23 −0 test.js
  3. +238 −207 test/tests.js
  4. +6 −0 test2.js
View
Oops, something went wrong.
View
@@ -1,25 +1,46 @@
(function() {
var addToObj, addToObjectMaker, allDone, allTestsDone, asyncEx, before, befores, cb, doneMaker, eq, isEqual, nimble, ok, s, str, stuff, sub, test, testDone, tests, wait, _, _ref, _ref2;
+
_ = require("underscore");
+
nimble = require("nimble");
+
require("./drews-mixins")(_);
+
_.mixin(nimble);
+
eq = _.assertEqual, s = _.s, doneMaker = _.doneMaker, ok = _.assertOk, asyncEx = _.asyncEx, wait = _.wait, isEqual = _.isEqual, addToObjectMaker = _.addToObjectMaker;
+
tests = {};
+
befores = {};
+
test = addToObjectMaker(tests);
+
before = addToObjectMaker(befores);
+
stuff = {};
+
addToObj = addToObjectMaker(stuff);
+
addToObj("name", "aterciopelados");
+
addToObj("cd", "rio");
+
eq(stuff.name, "aterciopelados", "name should be aterciopelados");
+
str = "this is a test";
+
sub = s(str, 2, 2);
+
eq(sub, "is");
+
eq(s(str, -1), "t");
+
_ref = doneMaker(), testDone = _ref[0], allTestsDone = _ref[1];
+
_ref2 = doneMaker(), cb = _ref2[0], allDone = _ref2[1];
+
(function() {
var done;
done = testDone();
@@ -40,7 +61,9 @@
return done();
});
})();
+
allTestsDone(function(err, results) {
return console.log("" + (_.getAssertCount()) + " tests ran\n" + (_.getPassCount()) + " tests passed\n" + (_.getFailCount()) + " tests failed");
});
+
}).call(this);
Oops, something went wrong.

0 comments on commit 56327ad

Please sign in to comment.