Comparing version 0.2.5 to 0.2.6
# How to compile | ||
```bash | ||
npm install && awk 'FNR==1{print ""}1' src/*.coffee src/package-start.txt package.json src/package-end.txt | node_modules/coffee-script/bin/coffee -cs > wishlist.js && node_modules/uglify-js/bin/uglifyjs wishlist.js -o wishlist.min.js -m --screw-ie8 --comments && awk 'FNR==1{print ""}1' test/*.coffee | node_modules/coffee-script/bin/coffee -cs > test/compiled.js && awk 'FNR==1{print ""}1' integration-test/*.coffee | node_modules/coffee-script/bin/coffee -cs > integration-test/compiled.js | ||
npm install && awk 'FNR==1{print ""}1' src/*.coffee src/package-start.txt package.json src/package-end.txt | node_modules/coffee-script/bin/coffee -cs > wishlist.js && node_modules/uglify-js/bin/uglifyjs wishlist.js -o wishlist.min.js -m --screw-ie8 --comments && awk 'FNR==1{print ""}1' test/*.coffee | node_modules/coffee-script/bin/coffee -cs > test/compiled.js | ||
``` | ||
# How to Test | ||
After compiling, run "test/compiled.js" (Node) or visit "test/page.html" (browser). | ||
# How to publish | ||
@@ -16,3 +20,3 @@ | ||
```bash | ||
git checkout -b release && git add -f wishlist.js wishlist.min.js test/compiled.js integration-test/compiled.js | ||
git checkout -b release && git add -f wishlist.js wishlist.min.js test/compiled.js | ||
``` | ||
@@ -19,0 +23,0 @@ |
{ | ||
"name": "wishlist", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"description": "Super natural testing framework.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
// Generated by CoffeeScript 1.7.1 | ||
(function() { | ||
var Test, wishlist; | ||
var Test, stepIndex, steps, stepsTimer, wishlist, | ||
__hasProp = {}.hasOwnProperty, | ||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; | ||
@@ -9,6 +11,571 @@ wishlist = typeof npmWishlist !== "undefined" && npmWishlist !== null ? npmWishlist : require("../wishlist"); | ||
new Test("root").add(function(my, I) { | ||
return I.wish(' true=true '); | ||
}).run(); | ||
steps = []; | ||
/* | ||
The output should look something like this: | ||
2014-06-15T09:20:04.655Z OK: 13, Exception: 1, Pending: 4 | ||
2014-06-15T09:20:05.594Z OK: 13, Exception: 1, Pending: 4 | ||
2014-06-15T09:20:06.595Z OK: 16, Exception: 1, Pending: 1 | ||
2014-06-15T09:20:07.596Z OK: 17, Exception: 1, Pending: 0 | ||
********** Exceptional Test ********** | ||
Test: | ||
Function: function () { | ||
return falseFunction(true); | ||
} | ||
Error Name: ReferenceError | ||
Error Message: falseFunction is not defined | ||
Error Stack: ... | ||
********** Broken Wish ********** | ||
Test: root --> String.prototype test | ||
Wish: wrongStr.split(" ")=["hello","world"] | ||
Expected: = ["hello","world"] | ||
Actual: ["helloo","world"] | ||
********** Broken Wish ********** | ||
Test: root --> String.prototype test | ||
Wish: wrongStr.split(" ")=["hello","world"] | ||
Expected: = ["hello","world"] | ||
Actual: ["helloo","world"] | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: var1 equals var2 | ||
Expected: = 1234 | ||
Actual: 111 | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: var2 <><><> a | ||
Expected: ≠ 1234 | ||
Actual: 1234 | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: 1+2+3=7 | ||
Expected: = 7 | ||
Actual: 6 | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: (obj.unit>1)=true | ||
Expected: = true | ||
Actual: false | ||
********** Broken Wish ********** | ||
Test: root --> nested test --> test 2 in nested test | ||
Wish: simple boolean test | ||
Expected: = true | ||
Actual: false | ||
********** Broken Wish ********** | ||
Test: root --> nested var | ||
Wish: var1 is var2 | ||
Expected: is 8888 | ||
Actual: 111 | ||
********** Broken Wish ********** | ||
Test: root --> nested var | ||
Wish: var3=1 | ||
Expected: = 1 | ||
Actual: 222 | ||
********** Broken Wish ********** | ||
Test: root --> nested var --> | ||
Wish: var1=var2 | ||
Expected: = 8888 | ||
Actual: 111 | ||
********** Broken Wish ********** | ||
Test: root --> simple test 2 | ||
Wish: slowVar='iii' | ||
Expected: = "iii" | ||
Actual: "yyy" | ||
********** Broken Wish ********** | ||
Test: root --> simple test 2 | ||
Wish: var2=true | ||
Expected: = true | ||
Actual: 1234 | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: ("1"===2)=true | ||
Expected: = true | ||
Actual: false | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: inexistentVariable=inexistentVariable | ||
Expected: unknown | ||
Actual: unknown | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: jiojaalgfj(lksfjeosjirg========; | ||
Expected: unknown | ||
Actual: unknown | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: {} is {} | ||
Expected: is {} | ||
Actual: {} | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: [] is [] | ||
Expected: is [] | ||
Actual: [] | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: null<>null | ||
Expected: ≠ null | ||
Actual: null | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: undefined<>undefined | ||
Expected: ≠ undefined | ||
Actual: undefined | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: sampleNaN1=1 | ||
Expected: = 1 | ||
Actual: NaN | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: NaN= 3 | ||
Expected: = 3 | ||
Actual: NaN | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: '' =NaN | ||
Expected: = NaN | ||
Actual: "" | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: 0=-0 | ||
Expected: = -0 | ||
Actual: 0 | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: 0 is -0 | ||
Expected: is -0 | ||
Actual: 0 | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: -0 is 0 | ||
Expected: is 0 | ||
Actual: -0 | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: b throws | ||
Expected: exception | ||
Actual: no exception | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: a throws /kkk/ | ||
Expected: an exception | ||
Actual: another exception | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: a throws CustomError | ||
Expected: an exception | ||
Actual: another exception | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: a | ||
Expected: no exception | ||
Actual: exception | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: var2<1000 | ||
Expected: < 1000 | ||
Actual: 1234 | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: var2<1234 | ||
Expected: < 1234 | ||
Actual: 1234 | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: var2<=1000 | ||
Expected: <= 1000 | ||
Actual: 1234 | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: var2 >2000 | ||
Expected: > 2000 | ||
Actual: 1234 | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: var2 >= 2000 | ||
Expected: >= 2000 | ||
Actual: 1234 | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: "a">"b" | ||
Expected: > "b" | ||
Actual: "a" | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: /=/.test("=")=false | ||
Expected: = false | ||
Actual: true | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: "\""="\"abc" | ||
Expected: = "\"abc" | ||
Actual: "\"" | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: 123<>123 | ||
Expected: ≠ 123 | ||
Actual: 123 | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: {a:1,b:2}<>{a:1,b:2} | ||
Expected: ≠ {"a":1,"b":2} | ||
Actual: {"a":1,"b":2} | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: NaN isnt NaN | ||
Expected: isn't NaN | ||
Actual: NaN | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: {a:1,b:2}={a:1,b:2,c:function(){}} | ||
Expected: = {"a":1,"b":2,"c":[Function]} | ||
Actual: {"a":1,"b":2} | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: {a:{a:{a:{a:{}}}}}={a:{a:{a:{a:1}}}} | ||
Expected: = {"a":{"a":{"a":[Object]}}} | ||
Actual: {"a":{"a":{"a":[Object]}}} | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: circularObj isnt circularObj | ||
Expected: isn't {"a":{"a":{"a":[Object],"b":[Array]},"b":[3,4]},"b":[3,4]} | ||
Actual: {"a":{"a":{"a":[Object],"b":[Array]},"b":[3,4]},"b":[3,4]} | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: circularObj <> circularObj | ||
Expected: ≠ {"a":{"a":{"a":[Object],"b":[Array]},"b":[3,4]},"b":[3,4]} | ||
Actual: {"a":{"a":{"a":[Object],"b":[Array]},"b":[3,4]},"b":[3,4]} | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: circularObj is circularObj2 | ||
Expected: is {"a":{"a":{"a":[Object],"b":[Array]},"b":[3,4]},"b":[3,4]} | ||
Actual: {"a":{"a":{"a":[Object],"b":[Array]},"b":[3,4]},"b":[3,4]} | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: circularObj = circularObj2 | ||
Expected: = {"a":{"a":{"a":[Object],"b":[Array]},"b":[3,4]},"b":[3,4]} | ||
Actual: {"a":{"a":{"a":[Object],"b":[Array]},"b":[3,4]},"b":[3,4]} | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: circularWrapper is circularWrapper2 | ||
Expected: is {"content":{"a":{"a":[Object],"b":[Array]},"b":[3,4]},"b":[5,6]} | ||
Actual: {"content":{"a":{"a":[Object],"b":[Array]},"b":[3,4]},"b":[5,6]} | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: circularWrapper <> circularWrapper2 | ||
Expected: ≠ {"content":{"a":{"a":[Object],"b":[Array]},"b":[3,4]},"b":[5,6]} | ||
Actual: {"content":{"a":{"a":[Object],"b":[Array]},"b":[3,4]},"b":[5,6]} | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: veryLongCircularObj1=veryLongCircularObj2 | ||
Expected: = {"me":[Object],"secondMe":[Object],"thirdMe":[Object],"meArray":[Array],"a":"............................................................","b":"............................................................","c":"............................................................","d":"............................................................","e":"............................................................","f":"............................................................","g":"............................................................","h":"............................................................","i":"............................................................","j":"............................................................","k":"............................................................","l":"............................................................"} | ||
Actual: {"me":[Object],"secondMe":[Object],"thirdMe":[Object],"meArray":[Array],"a":"............................................................","b":"............................................................","c":"............................................................","d":"............................................................","e":"............................................................","f":"............................................................","g":"............................................................","h":"............................................................","i":"............................................................","j":"............................................................","k":"............................................................","l":"............................................................"} | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: veryLongCircularObj1 is veryLongCircularObj2 | ||
Expected: is {"me":[Object],"secondMe":[Object],"thirdMe":[Object],"meArray":[Array],"a":"............................................................","b":"............................................................","c":"............................................................","d":"............................................................","e":"............................................................","f":"............................................................","g":"............................................................","h":"............................................................","i":"............................................................","j":"............................................................","k":"............................................................","l":"............................................................"} | ||
Actual: {"me":[Object],"secondMe":[Object],"thirdMe":[Object],"meArray":[Array],"a":"............................................................","b":"............................................................","c":"............................................................","d":"............................................................","e":"............................................................","f":"............................................................","g":"............................................................","h":"............................................................","i":"............................................................","j":"............................................................","k":"............................................................","l":"............................................................"} | ||
********** Broken Wish ********** | ||
Test: root --> | ||
Wish: [ | ||
1, 2, 3, | ||
"asdf", "jkl", | ||
{ | ||
yyy: 4, | ||
iii: 5, | ||
jjj: NaN, | ||
kkk: null, | ||
"mmm e": -9, | ||
d: undefined | ||
} | ||
] | ||
= | ||
[ | ||
1, 2, 3, | ||
"asdf", "jkl", | ||
{ | ||
yyy: 4, | ||
iii: 5, | ||
jjj: NaN, | ||
kkk: null, | ||
"mmm e": -10, | ||
d: undefined | ||
} | ||
] | ||
Expected: = [1,2,3,"asdf","jkl",{"yyy":4,"iii":5,"jjj":NaN,"kkk":null,"mmm e":-10,"d":undefined}] | ||
Actual: [1,2,3,"asdf","jkl",{"yyy":4,"iii":5,"jjj":NaN,"kkk":null,"mmm e":-9,"d":undefined}] | ||
1 tests of 18 exceptional. 51 wishes of 100 broken. Mark: e739b | ||
*/ | ||
steps.push(function() { | ||
console.log("----- General -----"); | ||
return new Test("root").set(function(v) { | ||
v.var1 = 111; | ||
return v.var2 = 1234; | ||
}).add("String.prototype test", function(v) { | ||
v.str = "hello world"; | ||
return v.wrongStr = "helloo world"; | ||
}, [' str.substr(4,1)="o" ', ' str.split(" ")=["hello","world"] ', ' str.split(" ")=["hello","world"] ', ' wrongStr.substr(4,1)="o" ', ' wrongStr.split(" ")=["hello","world"] ', ' wrongStr.split(" ")=["hello","world"] ']).add(function(v) { | ||
return v.a = v.var2; | ||
}, "Math.round(5.3)=5;\nvar1=var2:var1 equals var2;\nvar1<>var2;\nvar2=a : var1=========a;\nvar2<>a\n : var2 <><><> a\n;").add(function() { | ||
return void 0; | ||
}, ['1+2+3=7']).add(function(v) { | ||
v.obj = {}; | ||
v.obj.unit = function() { | ||
return Math.random(); | ||
}; | ||
return v.obj.unit(); | ||
}, [' (obj.unit>1)=true']).add(new Test("nested test").setAsync(function(v, t) { | ||
return setTimeout(function() { | ||
return t.end(); | ||
}, 1500); | ||
}).add("test 1 in nested test", function() { | ||
return void 0; | ||
}, ['false=false']).add("test 2 in nested test", function() { | ||
return void 0; | ||
}, ["false=true: simple boolean test"])).add(new Test("nested var").add(function() { | ||
return void 0; | ||
}, ['var1=var2']).add(function() { | ||
return void 0; | ||
}, ['var1<>var2']).set(function(env) { | ||
env.var2 = 8888; | ||
return env.var3 = env.var1 * 2; | ||
}, ['var1 is var2', 'var1 isnt var2', 'var3=1'])).addAsync("simple test 2", function(v, t) { | ||
return setTimeout(function() { | ||
v.slowVar = "yyy"; | ||
return t.end(); | ||
}, 2500); | ||
}, ["true=true :truthy unit", "slowVar='yyy'", "slowVar='iii'", "slowVar='yyy'", "var2=true"]).add(function() { | ||
return void 0; | ||
}, ["(\"1\"===2)=true"]).add(function() { | ||
return void 0; | ||
}, "inexistentVariable=inexistentVariable;\njiojaalgfj(lksfjeosjirg========;").add(function() { | ||
return falseFunction(true); | ||
}, "true=true").add(function(v, t) { | ||
t.wish("{} is {}"); | ||
t.wish(" [] is [] "); | ||
t.wish("NaN is NaN"); | ||
t.wish("NaN = NaN"); | ||
t.wish("null<>null"); | ||
t.wish("undefined<>undefined"); | ||
v.sampleNaN1 = NaN; | ||
v.sampleNaN2 = NaN; | ||
t.wish('sampleNaN1=sampleNaN2'); | ||
t.wish('sampleNaN1=1'); | ||
t.wish("NaN= 3"); | ||
t.wish("'' =NaN"); | ||
t.wish("0=0"); | ||
t.wish("0=-0"); | ||
t.wish("0 is -0"); | ||
t.wish("-0 is 0"); | ||
v.CustomError = (function(_super) { | ||
__extends(CustomError, _super); | ||
function CustomError(msg) { | ||
CustomError.__super__.constructor.call(this, msg); | ||
} | ||
return CustomError; | ||
})(Error); | ||
v.a = function() { | ||
throw new Error(); | ||
}; | ||
v.b = function() {}; | ||
v.c = function() { | ||
throw new v.CustomError(); | ||
}; | ||
t.wish('a throws'); | ||
t.wish('b throws'); | ||
t.wish('a throws /kkk/'); | ||
t.wish('a throws /^$/'); | ||
t.wish('a throws Error'); | ||
t.wish('a throws CustomError'); | ||
t.wish('c throws Error'); | ||
t.wish('c throws CustomError'); | ||
t.wish('b'); | ||
t.wish('a'); | ||
t.wish('var2<1000'); | ||
t.wish('var2< 2000'); | ||
t.wish('var2<1234'); | ||
t.wish('var2 <= 1234'); | ||
t.wish('var2<=2000'); | ||
t.wish('var2<=1000'); | ||
t.wish('var2>1000'); | ||
t.wish('var2 >2000'); | ||
t.wish('var2 >= 2000'); | ||
t.wish('var2 >= 1234'); | ||
t.wish('var2>=1000'); | ||
t.wish(' "a"<"b" '); | ||
t.wish(' "a">"b" '); | ||
t.wish(' /=/.test("=")=true '); | ||
t.wish(' /=/.test("=")=false '); | ||
t.wish('Object . is is Object.is'); | ||
t.wish('Object.is = Object. is'); | ||
t.wish(' "\\""="\\"abc" '); | ||
t.wish(' 123<>123 '); | ||
t.wish(' 123<>456 '); | ||
t.wish(' {a:1,b:2}<>{a:1,b:1} '); | ||
t.wish(' {a:1,b:2}<>{a:1,b:2} '); | ||
t.wish(' {a:1,b:2}<>{a:1,b:2,c:function(){}} '); | ||
t.wish(' 8 isnt 4 '); | ||
t.wish(' NaN isnt NaN '); | ||
t.wish(' {} isnt {} '); | ||
t.wish(' {a:1,b:2}={a:1,b:2,c:function(){}} '); | ||
t.wish(' {a:{a:{a:{a:{}}}}}={a:{a:{a:{a:{}}}}} '); | ||
t.wish(' {a:{a:{a:{a:{}}}}}={a:{a:{a:{a:1}}}} '); | ||
v.circularObj = {}; | ||
v.circularObj.a = v.circularObj; | ||
v.circularObj.b = [3, 4]; | ||
v.circularObj2 = {}; | ||
v.circularObj2.a = v.circularObj2; | ||
v.circularObj2.b = [3, 4]; | ||
t.wish(' circularObj isnt circularObj '); | ||
t.wish(' circularObj is circularObj '); | ||
t.wish(' circularObj = circularObj '); | ||
t.wish(' circularObj <> circularObj '); | ||
t.wish(' circularObj isnt circularObj2 '); | ||
t.wish(' circularObj is circularObj2 '); | ||
t.wish(' circularObj = circularObj2 '); | ||
t.wish(' circularObj <> circularObj2 '); | ||
v.circularWrapper = {}; | ||
v.circularWrapper.content = v.circularObj; | ||
v.circularWrapper.b = [5, 6]; | ||
v.circularWrapper2 = {}; | ||
v.circularWrapper2.content = v.circularObj; | ||
v.circularWrapper2.b = [5, 6]; | ||
t.wish(' circularWrapper isnt circularWrapper2 '); | ||
t.wish(' circularWrapper is circularWrapper2 '); | ||
t.wish(' circularWrapper = circularWrapper2 '); | ||
return t.wish(' circularWrapper <> circularWrapper2 '); | ||
}).add(function(v, t) { | ||
v.veryLongCircularObj1 = {}; | ||
v.veryLongCircularObj1.me = v.veryLongCircularObj1; | ||
v.veryLongCircularObj1.secondMe = v.veryLongCircularObj1; | ||
v.veryLongCircularObj1.thirdMe = v.veryLongCircularObj1; | ||
v.veryLongCircularObj1.meArray = [v.veryLongCircularObj1, v.veryLongCircularObj1]; | ||
v.veryLongCircularObj1.a = "............................................................"; | ||
v.veryLongCircularObj1.b = "............................................................"; | ||
v.veryLongCircularObj1.c = "............................................................"; | ||
v.veryLongCircularObj1.d = "............................................................"; | ||
v.veryLongCircularObj1.e = "............................................................"; | ||
v.veryLongCircularObj1.f = "............................................................"; | ||
v.veryLongCircularObj1.g = "............................................................"; | ||
v.veryLongCircularObj1.h = "............................................................"; | ||
v.veryLongCircularObj1.i = "............................................................"; | ||
v.veryLongCircularObj1.j = "............................................................"; | ||
v.veryLongCircularObj1.k = "............................................................"; | ||
v.veryLongCircularObj1.l = "............................................................"; | ||
v.veryLongCircularObj2 = {}; | ||
v.veryLongCircularObj2.me = v.veryLongCircularObj2; | ||
v.veryLongCircularObj2.secondMe = v.veryLongCircularObj2; | ||
v.veryLongCircularObj2.thirdMe = v.veryLongCircularObj2; | ||
v.veryLongCircularObj2.meArray = [v.veryLongCircularObj2, v.veryLongCircularObj2]; | ||
v.veryLongCircularObj2.a = "............................................................"; | ||
v.veryLongCircularObj2.b = "............................................................"; | ||
v.veryLongCircularObj2.c = "............................................................"; | ||
v.veryLongCircularObj2.d = "............................................................"; | ||
v.veryLongCircularObj2.e = "............................................................"; | ||
v.veryLongCircularObj2.f = "............................................................"; | ||
v.veryLongCircularObj2.g = "............................................................"; | ||
v.veryLongCircularObj2.h = "............................................................"; | ||
v.veryLongCircularObj2.i = "............................................................"; | ||
v.veryLongCircularObj2.j = "............................................................"; | ||
v.veryLongCircularObj2.k = "............................................................"; | ||
v.veryLongCircularObj2.l = "............................................................"; | ||
t.wish('veryLongCircularObj1=veryLongCircularObj2'); | ||
t.wish('veryLongCircularObj1<>veryLongCircularObj2'); | ||
t.wish('veryLongCircularObj1 is veryLongCircularObj2'); | ||
return t.wish('veryLongCircularObj1 isnt veryLongCircularObj2'); | ||
}).add(function(v, t) { | ||
t.wish("[\n 1, 2, 3,\n \"asdf\", \"jkl\",\n {\n yyy: 4,\n iii: 5,\n jjj: NaN,\n kkk: null,\n \"mmm e\": -9,\n d: undefined\n }\n]\n=\n[\n 1, 2, 3,\n \"asdf\", \"jkl\",\n {\n yyy: 4,\n iii: 5,\n jjj: NaN,\n kkk: null,\n \"mmm e\": -10,\n d: undefined\n }\n]"); | ||
return t.wish("[\n 1, 2, 3,\n \"asdf\", \"jkl\",\n {\n yyy: 4,\n iii: 5,\n jjj: NaN,\n kkk: null,\n \"mmm e\": -9,\n d: undefined\n }\n]\n=\n[\n 1, 2, 3,\n \"asdf\", \"jkl\",\n {\n yyy: 4,\n iii: 5,\n jjj: NaN,\n kkk: null,\n \"mmm e\": -9,\n d: undefined\n }\n]"); | ||
}).run(); | ||
}); | ||
/* | ||
The output should look something like this: | ||
2014-07-13T15:13:23.707Z OK: 1, Exception: 0, Pending: 0 | ||
Tests OK. Wishes fulfilled. Mark: e3b0c | ||
*/ | ||
steps.push(function() { | ||
console.log("----- Tiny -----"); | ||
return new Test().run(); | ||
}); | ||
stepIndex = -1; | ||
stepsTimer = setInterval(function() { | ||
if (wishlist.currentRootTest === null) { | ||
if (stepIndex === steps.length - 1) { | ||
return clearInterval(stepsTimer); | ||
} else { | ||
stepIndex++; | ||
return steps[stepIndex](); | ||
} | ||
} | ||
}, 10); | ||
}).call(this); |
@@ -95,2 +95,4 @@ // Generated by CoffeeScript 1.7.1 | ||
npmWishlist.currentRootTest = null; | ||
npmWishlist.parseExpression = function(expStr, envNames) { | ||
@@ -658,7 +660,10 @@ var c, dotAffected, i, objectKeyReady, oldDotAffected, oldObjectKeyReady, oldSlashQuoteReady, oldWordStarted, positions, quote, regex, s, slashQuoteReady, wordStarted; | ||
Test.prototype.run = function(showsMessage) { | ||
Test.prototype.run = function(isRoot) { | ||
var allTests, timer, timerJob, traverse; | ||
if (showsMessage == null) { | ||
showsMessage = true; | ||
if (isRoot == null) { | ||
isRoot = true; | ||
} | ||
if (isRoot) { | ||
npmWishlist.currentRootTest = this; | ||
} | ||
this._resetContext(); | ||
@@ -698,3 +703,3 @@ if (this.parent != null) { | ||
})(this), 0); | ||
if (showsMessage) { | ||
if (isRoot) { | ||
allTests = []; | ||
@@ -762,5 +767,4 @@ allTests.push(this); | ||
console.log("\n" + ((exceptionTests.length === 0 ? "Tests OK." : "" + exceptionTests.length + " tests of " + allTests.length + " exceptional.") + " " + (failureCount === 0 ? "Wishes fulfilled." : "" + failureCount + " wishes of " + (failureCount + successCount) + " broken.") + " " + ("Mark: " + mark)) + "\n"); | ||
if (typeof process !== "undefined" && process !== null) { | ||
return process.exit(); | ||
} | ||
_this.allEnded = true; | ||
return npmWishlist.currentRootTest = null; | ||
} | ||
@@ -1132,3 +1136,3 @@ }; | ||
"name": "wishlist", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"description": "Super natural testing framework.", | ||
@@ -1135,0 +1139,0 @@ "keywords": ["test", "testing", "async", "unit", "bdd", "tdd", "asynchronous", "assertion", "assert", "mocha", "qunit", "karma", "jasmine", "vows", "qunitjs", "chai"], |
@@ -7,2 +7,2 @@ /* @preserve | ||
*/ | ||
(function(){var npmWishlist,__indexOf=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++){if(t in this&&this[t]===e)return t}return-1};npmWishlist={};npmWishlist.environmentType=typeof exports!=="undefined"&&exports!==null&&(typeof module!=="undefined"&&module!==null?module.exports:void 0)!=null&&(typeof process!=="undefined"&&process!==null?process.execPath:void 0)!=null&&typeof process.execPath==="string"&&process.execPath.search(/node/i)!==-1?"node":typeof window!=="undefined"&&window!==null&&(typeof navigator!=="undefined"&&navigator!==null)&&(typeof HTMLElement!=="undefined"&&HTMLElement!==null)?"browser":void 0;npmWishlist.moduleSystem=typeof exports!=="undefined"&&exports!==null&&(typeof module!=="undefined"&&module!==null?module.exports:void 0)!=null?"commonjs":null;npmWishlist.objectIs=function(e,t){if(typeof e==="number"&&typeof t==="number"){if(e===0&&t===0){return 1/e===1/t}else if(isNaN(e)&&isNaN(t)){return true}else{return e===t}}else{return e===t}};npmWishlist.objectClone=function(e){var t,n,s,r,i;n={};i=Object.keys(e);for(s=0,r=i.length;s<r;s++){t=i[s];n[t]=e[t]}return n};npmWishlist.valueToMessage=function(e){var t,n;t=function(e,n){if(e===void 0){return"undefined"}else if(e===null){return"null"}else if(Array.isArray(e)){if(n>0){return"["+e.map(function(e){return t(e,n-1)}).join(",")+"]"}else{return"[Array]"}}else if(typeof e==="function"){return"[Function]"}else if(typeof e==="object"){if(n>0){return"{"+Object.keys(e).map(function(s){return""+JSON.stringify(s)+":"+t(e[s],n-1)}).join(",")+"}"}else{return"[Object]"}}else if(typeof e==="string"){return JSON.stringify(e.toString())}else if(typeof e==="number"){if(npmWishlist.objectIs(e,-0)){return"-0"}else{return e.toString()}}else{return e.toString()}};n=t(e,3);if(n.length>1e3){n=t(e,2)}if(n.length>1e3){n=t(e,1)}if(n.length>1e3){n=t(e,0)}return n};npmWishlist.parseExpression=function(e,t){var n,s,r,i,l,u,o,a,f,p,c,h,m,y;e+=" ";if(t.length===0){return[]}c=new RegExp("^("+t.join("|")+")[^a-zA-Z0-9_$]","g");f=[];p=null;m=true;y=false;s=false;i=false;r=0;while(r<e.length-1){n=e[r];o=m;if(p===null){if("a"<=n&&n<="z"||"A"<=n&&n<="Z"||"0"<=n&&n<="9"||n==="_"||n==="$"||n===")"||n==="]"){m=false}else if(n===" "||n===" "||n==="\n"||n==="\r"){}else{m=true}}a=y;if(p===null){if("a"<=n&&n<="z"||"A"<=n&&n<="Z"||"0"<=n&&n<="9"||n==="_"||n==="$"||n==="."){y=true}else{y=false}}l=s;if(p===null){if(n==="."){s=true}else if(n===" "||n===" "||n==="\n"||n==="\r"){}else{s=false}}u=i;if(p===null){if(n==="{"||n===","){i=true}else if(n===" "||n===" "||n==="\n"||n==="\r"){}else{i=false}}if(n==='"'&&p===null){p="double";r++}else if(n==="'"&&p===null){p="single";r++}else if(n==="/"&&p===null&&o){p="slash";r++}else if(n==='"'&&p==="double"||n==="'"&&p==="single"||n==="/"&&p==="slash"){p=null;r++}else if(n==="\\"&&p!==null){r+=2}else if(p===null&&!a&&!l&&("a"<=n&&n<="z"||"A"<=n&&n<="Z")){h=e.substr(r,31);if(!(u&&h.search(/^([a-zA-Z0-9_$])+\s*:/)!==-1)&&h.search(c)!==-1){f.push(r)}r++}else{r++}}return f};npmWishlist.parseWish=function(e){var t,n;n=null;t=null;[0,1].forEach(function(s){var r,i,l,u,o,a,f,p,c,h,m,y;h=null;c=0;i=0;r=0;y=true;u=false;o=0;while(o<e.length){l=e[o];p=y;if(h===null){if("a"<=l&&l<="z"||"A"<=l&&l<="Z"||"0"<=l&&l<="9"||l==="_"||l==="$"||l===")"||l==="]"){y=false}else if(l===" "||l===" "||l==="\n"||l==="\r"){}else{y=true}}f=u;if(h===null){if(l==="."){u=true}else if(l===" "||l===" "||l==="\n"||l==="\r"){}else{u=false}}if(l==='"'&&h===null){h="double";o++}else if(l==="'"&&h===null){h="single";o++}else if(l==="/"&&h===null&&p){h="slash";o++}else if(l==='"'&&h==="double"||l==="'"&&h==="single"||l==="/"&&h==="slash"){h=null;o++}else if(l==="\\"&&h!==null){o+=2}else if(l==="("){c++;o++}else if(l==="["){i++;o++}else if(l==="{"){r++;o++}else if(l===")"){c--;o++}else if(l==="]"){i--;o++}else if(l==="}"){r--;o++}else if(h===null&&!f&&(c===i&&i===r&&r===0)){if(s===0){if(l===":"){t=e.substr(o+1);e=e.substr(0,o);break}}else if(s===1){m=e.substr(o);if((a=m.match(/^=([^]+)$/))!=null){n={type:"equal",components:[e.substr(0,o),a[1]]};break}else if((a=m.match(/^<>([^]+)$/))!=null){n={type:"notEqual",components:[e.substr(0,o),a[1]]};break}else if((a=m.match(/^\sis\s([^]+)$/))!=null){n={type:"is",components:[e.substr(0,o),a[1]]};break}else if((a=m.match(/^\sisnt\s([^]+)$/))!=null){n={type:"isnt",components:[e.substr(0,o),a[1]]};break}else if((a=m.match(/^\sthrows(?:\s([^]+))?$/))!=null){n={type:"throws",components:[e.substr(0,o),a[1]!=null?a[1]:"undefined"]};break}else if((a=m.match(/^<=([^]+)$/))!=null){n={type:"lessThanOrEqual",components:[e.substr(0,o),a[1]]};break}else if((a=m.match(/^>=([^]+)$/))!=null){n={type:"greaterThanOrEqual",components:[e.substr(0,o),a[1]]};break}else if((a=m.match(/^<([^]+)$/))!=null){n={type:"lessThan",components:[e.substr(0,o),a[1]]};break}else if((a=m.match(/^>([^]+)$/))!=null){n={type:"greaterThan",components:[e.substr(0,o),a[1]]};break}}o++}else{o++}}if(s===1){return n!=null?n:n={type:"doesNotThrow",components:[e]}}});n.components.push(JSON.stringify((t!=null?t:e).trim()));return n};npmWishlist.parseWishes=function(e){var t,n,s,r,i,l,u,o,a,f,p,c;a=null;u=0;n=0;t=0;c=true;o=[];r=0;while(r<e.length){s=e[r];l=c;if(a===null){if("a"<=s&&s<="z"||"A"<=s&&s<="Z"||"0"<=s&&s<="9"||s==="_"||s==="$"||s===")"||s==="]"){c=false}else if(s===" "||s===" "||s==="\n"||s==="\r"){}else{c=true}}if(s==='"'&&a===null){a="double";r++}else if(s==="'"&&a===null){a="single";r++}else if(s==="/"&&a===null&&l){a="slash";r++}else if(s==='"'&&a==="double"||s==="'"&&a==="single"||s==="/"&&a==="slash"){a=null;r++}else if(s==="\\"&&a!==null){r+=2}else if(s==="("){u++;r++}else if(s==="["){n++;r++}else if(s==="{"){t++;r++}else if(s===")"){u--;r++}else if(s==="]"){n--;r++}else if(s==="}"){t--;r++}else if(a===null&&(u===n&&n===t&&t===0)&&s===";"){o.push(r);r++}else{r++}}f=[];i=-1;o.forEach(function(t){var n;n=e.substring(i+1,t).trim();if(n!==""){f.push(n)}return i=t});p=e.substr(i+1).trim();if(p!==""){f.push(p)}return f};npmWishlist.sha256=function(e){var t,n,s,r,i,l,u,o,a,f,p,c,h,m,y,g,d,v,b,W,T,_,w,x,j,k,A,E,M,O,z,S,I,$,N,q,C,Z,R,J;if(e.length>Math.round(Math.pow(2,31)-1)){throw new Error}I=function(e){var t;return function(){var n,s;s=[];for(t=n=7;n>=0;t=--n){s.push(((e>>>t*4)%16).toString(16))}return s}().join("")};y=function(){var e,t,n,s;t=0;for(n=0,s=arguments.length;n<s;n++){e=arguments[n];t=(t+e)%4294967296}return t};u=function(e,t){return e>>>t|e<<32-t};o=function(e,t){return e>>>t};t=function(e,t,n){return e&t^~e&n};i=function(e,t,n){return e&t^e&n^t&n};a=function(e){return u(e,2)^u(e,13)^u(e,22)};f=function(e){return u(e,6)^u(e,11)^u(e,25)};O=function(e){return u(e,7)^u(e,18)^o(e,3)};z=function(e){return u(e,17)^u(e,19)^o(e,10)};s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];n=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];d=e.split("").map(function(e){return e.charCodeAt(0)});A=e.length*8;k=448-A-1;while(k<0){k+=512}M=A+1+k+64;d.push(128);for(x=$=0,J=Math.round((k-7)/8);0<=J?$<J:$>J;x=0<=J?++$:--$){d.push(0)}d.push(0);d.push(0);d.push(0);d.push(0);d.push(A>>>24);d.push((A>>>16)%256);d.push((A>>>8)%256);d.push(A%256);l=Math.round(M/512);r=new Array(l);for(x=N=0;0<=l?N<l:N>l;x=0<=l?++N:--N){r[x]=new Array(16);for(j=q=0;q<16;j=++q){E=x*64+j*4;r[x][j]=d[E]<<24|d[E+1]<<16|d[E+2]<<8|d[E+3]}}h=new Array(64);for(x=C=0;0<=l?C<l:C>l;x=0<=l?++C:--C){for(S=Z=0;Z<64;S=++Z){h[S]=S<16?r[x][S]:y(z(h[S-2]),h[S-7],O(h[S-15]),h[S-16])}m=n[0];g=n[1];v=n[2];b=n[3];W=n[4];T=n[5];_=n[6];w=n[7];for(S=R=0;R<64;S=++R){p=y(w,f(W),t(W,T,_),s[S],h[S]);c=y(a(m),i(m,g,v));w=_;_=T;T=W;W=y(b,p);b=v;v=g;g=m;m=y(p,c)}n[0]=y(m,n[0]);n[1]=y(g,n[1]);n[2]=y(v,n[2]);n[3]=y(b,n[3]);n[4]=y(W,n[4]);n[5]=y(T,n[5]);n[6]=y(_,n[6]);n[7]=y(w,n[7])}return n.map(function(e){return I(e)}).join("")};npmWishlist.Test=function(){function Test(e){this.description=e!=null?e:"";this._children=[];this.fun=function(e){return function(){}}(this);this.wishes=[];this.async=false;this.parent=null;this._resetContext()}Test.prototype._resetContext=function(){this.env={};this.wishResults=[];return this.result=null};Test.prototype.set=function(){var e,t,n,s,r,i;e=t=i=r=s=void 0;n=function(e){return function(e){var t;t=Array.isArray(e)?e.join(";"):typeof e==="string"?e:"";return npmWishlist.parseWishes(t)}}(this);if(typeof arguments[0]==="string"){e=arguments[0];t=arguments[1];if(typeof arguments[2]==="object"&&arguments[2]!==null&&!Array.isArray(arguments[2])){s=arguments[2]}else{r=arguments[2];s=arguments[3]}}else{t=arguments[0];if(typeof arguments[1]==="object"&&arguments[1]!==null&&!Array.isArray(arguments[1])){s=arguments[1]}else{r=arguments[1];s=arguments[2]}}i=n(r);if(s==null){s={}}if(e!==void 0){this.description=e}this.fun=t;if(r!==void 0){this.wishes=i}if(s.async!==void 0){this.async=s.async}return this};Test.prototype.setAsync=function(){var e,t,n,s,r;e=[];for(s=0,r=arguments.length;s<r;s++){n=arguments[s];e.push(n)}t=e[e.length-1];if(typeof t==="object"&&t!==null&&!Array.isArray(t)){t.async=true}else{e.push({async:true})}return this.set.apply(this,e)};Test.prototype.add=function(){var e;e=null;if(arguments[0]instanceof npmWishlist.Test){e=arguments[0]}else{e=new npmWishlist.Test;e.set.apply(e,arguments)}e.parent=this;this._children.push(e);return this};Test.prototype.addAsync=function(){var e,t,n,s,r;e=[];for(s=0,r=arguments.length;s<r;s++){n=arguments[s];e.push(n)}t=e[e.length-1];if(typeof t==="object"&&t!==null&&!Array.isArray(t)){t.async=true}else{e.push({async:true})}return this.add.apply(this,e)};Test.prototype.getChildren=function(){return this._children.slice(0)};Test.prototype.getAncestors=function(){var e,t;t=this;e=[];while(t.parent!==null){e.push(t.parent);t=t.parent}return e};Test.prototype.run=function(e){var t,n,s,r;if(e==null){e=true}this._resetContext();if(this.parent!=null){this.env=npmWishlist.objectClone(this.parent.env)}setTimeout(function(e){return function(){var t;if(npmWishlist.environmentType==="node"){t=module.require("domain").create();t.on("error",function(t){return e.end({type:false,errorMessage:"Error Name: "+t.name+"\nError Message: "+t.message+"\nError Stack: "+t.stack})});t.run(function(){return e.fun(e.env,e)})}else{try{e.fun(e.env,e)}catch(t){e.end({type:false})}}if(e.result==null&&!e.async){return e.end({type:true})}}}(this),0);if(e){t=[];t.push(this);r=function(e){return function(e){return e.getChildren().forEach(function(e){t.push(e);return r(e)})}}(this);r(this);console.log();s=function(e){return function(){var e,s,r,i,l,u,o;l=t.filter(function(e){return e.result!=null&&e.result.type===true});e=t.filter(function(e){return e.result!=null&&e.result.type===false});u=t.filter(function(e){return e.result==null});console.log(""+(new Date).toISOString()+" OK: "+l.length+", "+("Exception: "+e.length+", Pending: "+u.length));if(u.length===0){clearInterval(n);e.forEach(function(e){console.log("\n********** Exceptional Test **********");console.log("Test: "+e.description);console.log("Function: "+e.fun.toString());if(e.result.errorMessage!=null){return console.log(e.result.errorMessage)}});s=0;o=0;i="";t.forEach(function(e){return e.wishResults.forEach(function(t){var n,r;i+=" "+t.type.toString();if(t.type===false){s++;n=e.getAncestors();n.reverse();r=n.concat([e]).map(function(e){return e.description}).join(" --> ");console.log("\n********** Broken Wish **********");console.log(" Test: "+r);console.log(" Wish: "+t.description);console.log("Expected: "+t.expected);return console.log(" Actual: "+t.actual)}else{return o++}})});i=i.trim();r=npmWishlist.sha256(i).substr(0,5);console.log("\n"+((e.length===0?"Tests OK.":""+e.length+" tests of "+t.length+" exceptional.")+" "+(s===0?"Wishes fulfilled.":""+s+" wishes of "+(s+o)+" broken.")+" "+("Mark: "+r))+"\n");if(typeof process!=="undefined"&&process!==null){return process.exit()}}}}(this);n=setInterval(s,1e3);setTimeout(s,10)}return this};Test.prototype.end=function(e){if(this.result==null){this.result=e!=null?e:{type:true};this.wishes.forEach(function(e){return function(t){return e._checkWish(t)}}(this));this.getChildren().forEach(function(e){return function(e){return e.run(false)}}(this))}return this};Test.prototype._checkWish=function(wishStr){var args,description,interpret,parsed,result,that;that=this;interpret=function(e){return function(t){npmWishlist.parseExpression(t,Object.keys(e.env)).forEach(function(e,n){var s,r;s="that.env.";r=e+s.length*n;return t=t.substr(0,r)+s+t.substr(r)});return t}}(this);parsed=npmWishlist.parseWish(wishStr);args=parsed.components.map(function(e){return function(e,t){if(t===parsed.components.length-1){return e}else{return interpret(e)}}}(this));description=JSON.parse(args[args.length-1]);result=function(){try{args=args.map(function(_this){return function(m){return eval("(("+m+"))")}}(this));return this["_check_"+parsed.type].apply(this,args)}catch(e){return{type:false,description:description,actual:"unknown",expected:"unknown"}}}.call(this);return this.wishResults.push(result)};Test.prototype.wish=function(e){return npmWishlist.parseWishes(e).forEach(function(e){return function(t){return e._checkWish(t)}}(this))};return Test}();npmWishlist.Test.prototype._check_equal=function(e,t,n){var s,r,i;if(n==null){n=""}r=[];s=function(e){return function(e,t){if(Array.isArray(e)&&Array.isArray(t)){if(t.every(function(t,n){if(__indexOf.call(r,t)>=0){return npmWishlist.objectIs(e[n],t)}else{if(typeof t==="object"&&t!==null){r.push(t)}return s(e[n],t)}})){return true}else{return false}}else if(typeof e==="object"&&e!==null&&typeof t==="object"&&t!==null){if(Object.keys(t).every(function(n){var i;if(i=t[n],__indexOf.call(r,i)>=0){return npmWishlist.objectIs(e[n],t[n])}else{if(typeof t[n]==="object"&&t[n]!==null){r.push(t[n])}return s(e[n],t[n])}})){return true}else{return false}}else{return npmWishlist.objectIs(e,t)}}}(this);i={type:s(e,t),description:n};if(i.type===false){i.actual=npmWishlist.valueToMessage(e);i.expected="= "+npmWishlist.valueToMessage(t)}return i};npmWishlist.Test.prototype._check_notEqual=function(e,t,n){var s,r,i;if(n==null){n=""}r=[];s=function(e){return function(e,t){if(Array.isArray(e)&&Array.isArray(t)){if(t.some(function(t,n){if(__indexOf.call(r,t)>=0){return!npmWishlist.objectIs(e[n],t)}else{if(typeof t==="object"&&t!==null){r.push(t)}return s(e[n],t)}})){return true}else{return false}}else if(typeof e==="object"&&e!==null&&typeof t==="object"&&t!==null){if(Object.keys(t).some(function(n){var i;if(i=t[n],__indexOf.call(r,i)>=0){return!npmWishlist.objectIs(e[n],t[n])}else{if(typeof t[n]==="object"&&t[n]!==null){r.push(t[n])}return s(e[n],t[n])}})){return true}else{return false}}else{return!npmWishlist.objectIs(e,t)}}}(this);i={type:s(e,t),description:n};if(i.type===false){i.actual=npmWishlist.valueToMessage(e);i.expected="≠ "+npmWishlist.valueToMessage(t)}return i};npmWishlist.Test.prototype._check_is=function(e,t,n){var s;if(n==null){n=""}s={type:npmWishlist.objectIs(e,t),description:n};if(s.type===false){s.actual=npmWishlist.valueToMessage(e);s.expected="is "+npmWishlist.valueToMessage(t)}return s};npmWishlist.Test.prototype._check_isnt=function(e,t,n){var s;if(n==null){n=""}s={type:!npmWishlist.objectIs(e,t),description:n};if(s.type===false){s.actual=npmWishlist.valueToMessage(e);s.expected="isn't "+npmWishlist.valueToMessage(t)}return s};npmWishlist.Test.prototype._check_throws=function(e,t,n){var s,r,i,l;if(n==null){n=""}r=false;l=function(){try{e();r=true;return false}catch(e){s=e;if(t==null){return true}else if(t instanceof RegExp){if(t.test(s.message)){return true}else{return false}}else{if(s instanceof t){return true}else{return false}}}}();i={type:l,description:n};if(i.type===false){i.actual=r?"no exception":"another exception";i.expected=r?"exception":"an exception"}return i};npmWishlist.Test.prototype._check_doesNotThrow=function(e,t){var n,s;if(t==null){t=""}s=function(){try{e();return true}catch(e){return false}}();n={type:s,description:t};if(n.type===false){n.actual="exception";n.expected="no exception"}return n};npmWishlist.Test.prototype._check_lessThan=function(e,t,n){var s;if(n==null){n=""}s={type:e<t,description:n};if(s.type===false){s.actual=npmWishlist.valueToMessage(e);s.expected="< "+npmWishlist.valueToMessage(t)}return s};npmWishlist.Test.prototype._check_lessThanOrEqual=function(e,t,n){var s;if(n==null){n=""}s={type:e<=t,description:n};if(s.type===false){s.actual=npmWishlist.valueToMessage(e);s.expected="<= "+npmWishlist.valueToMessage(t)}return s};npmWishlist.Test.prototype._check_greaterThan=function(e,t,n){var s;if(n==null){n=""}s={type:e>t,description:n};if(s.type===false){s.actual=npmWishlist.valueToMessage(e);s.expected="> "+npmWishlist.valueToMessage(t)}return s};npmWishlist.Test.prototype._check_greaterThanOrEqual=function(e,t,n){var s;if(n==null){n=""}s={type:e>=t,description:n};if(s.type===false){s.actual=npmWishlist.valueToMessage(e);s.expected=">= "+npmWishlist.valueToMessage(t)}return s};if(npmWishlist.environmentType==="browser"){window.npmWishlist=npmWishlist}if(npmWishlist.moduleSystem==="commonjs"){module.exports=npmWishlist}npmWishlist.packageInfo={name:"wishlist",version:"0.2.5",description:"Super natural testing framework.",keywords:["test","testing","async","unit","bdd","tdd","asynchronous","assertion","assert","mocha","qunit","karma","jasmine","vows","qunitjs","chai"],author:"Zhenzhen Zhan <zhanzhenzhen@hotmail.com>",homepage:"http://zhanzhenzhen.github.io/wishlist/",licenses:[{type:"MIT",url:"https://github.com/zhanzhenzhen/wishlist/blob/master/LICENSE.txt"}],repository:{type:"git",url:"https://github.com/zhanzhenzhen/wishlist.git"},devDependencies:{"coffee-script":"1.7.1","uglify-js":"2.4.13"},main:"wishlist"}}).call(this); | ||
(function(){var npmWishlist,__indexOf=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++){if(t in this&&this[t]===e)return t}return-1};npmWishlist={};npmWishlist.environmentType=typeof exports!=="undefined"&&exports!==null&&(typeof module!=="undefined"&&module!==null?module.exports:void 0)!=null&&(typeof process!=="undefined"&&process!==null?process.execPath:void 0)!=null&&typeof process.execPath==="string"&&process.execPath.search(/node/i)!==-1?"node":typeof window!=="undefined"&&window!==null&&(typeof navigator!=="undefined"&&navigator!==null)&&(typeof HTMLElement!=="undefined"&&HTMLElement!==null)?"browser":void 0;npmWishlist.moduleSystem=typeof exports!=="undefined"&&exports!==null&&(typeof module!=="undefined"&&module!==null?module.exports:void 0)!=null?"commonjs":null;npmWishlist.objectIs=function(e,t){if(typeof e==="number"&&typeof t==="number"){if(e===0&&t===0){return 1/e===1/t}else if(isNaN(e)&&isNaN(t)){return true}else{return e===t}}else{return e===t}};npmWishlist.objectClone=function(e){var t,n,s,r,i;n={};i=Object.keys(e);for(s=0,r=i.length;s<r;s++){t=i[s];n[t]=e[t]}return n};npmWishlist.valueToMessage=function(e){var t,n;t=function(e,n){if(e===void 0){return"undefined"}else if(e===null){return"null"}else if(Array.isArray(e)){if(n>0){return"["+e.map(function(e){return t(e,n-1)}).join(",")+"]"}else{return"[Array]"}}else if(typeof e==="function"){return"[Function]"}else if(typeof e==="object"){if(n>0){return"{"+Object.keys(e).map(function(s){return""+JSON.stringify(s)+":"+t(e[s],n-1)}).join(",")+"}"}else{return"[Object]"}}else if(typeof e==="string"){return JSON.stringify(e.toString())}else if(typeof e==="number"){if(npmWishlist.objectIs(e,-0)){return"-0"}else{return e.toString()}}else{return e.toString()}};n=t(e,3);if(n.length>1e3){n=t(e,2)}if(n.length>1e3){n=t(e,1)}if(n.length>1e3){n=t(e,0)}return n};npmWishlist.currentRootTest=null;npmWishlist.parseExpression=function(e,t){var n,s,r,i,l,u,o,a,f,p,c,h,m,y;e+=" ";if(t.length===0){return[]}c=new RegExp("^("+t.join("|")+")[^a-zA-Z0-9_$]","g");f=[];p=null;m=true;y=false;s=false;i=false;r=0;while(r<e.length-1){n=e[r];o=m;if(p===null){if("a"<=n&&n<="z"||"A"<=n&&n<="Z"||"0"<=n&&n<="9"||n==="_"||n==="$"||n===")"||n==="]"){m=false}else if(n===" "||n===" "||n==="\n"||n==="\r"){}else{m=true}}a=y;if(p===null){if("a"<=n&&n<="z"||"A"<=n&&n<="Z"||"0"<=n&&n<="9"||n==="_"||n==="$"||n==="."){y=true}else{y=false}}l=s;if(p===null){if(n==="."){s=true}else if(n===" "||n===" "||n==="\n"||n==="\r"){}else{s=false}}u=i;if(p===null){if(n==="{"||n===","){i=true}else if(n===" "||n===" "||n==="\n"||n==="\r"){}else{i=false}}if(n==='"'&&p===null){p="double";r++}else if(n==="'"&&p===null){p="single";r++}else if(n==="/"&&p===null&&o){p="slash";r++}else if(n==='"'&&p==="double"||n==="'"&&p==="single"||n==="/"&&p==="slash"){p=null;r++}else if(n==="\\"&&p!==null){r+=2}else if(p===null&&!a&&!l&&("a"<=n&&n<="z"||"A"<=n&&n<="Z")){h=e.substr(r,31);if(!(u&&h.search(/^([a-zA-Z0-9_$])+\s*:/)!==-1)&&h.search(c)!==-1){f.push(r)}r++}else{r++}}return f};npmWishlist.parseWish=function(e){var t,n;n=null;t=null;[0,1].forEach(function(s){var r,i,l,u,o,a,f,p,c,h,m,y;h=null;c=0;i=0;r=0;y=true;u=false;o=0;while(o<e.length){l=e[o];p=y;if(h===null){if("a"<=l&&l<="z"||"A"<=l&&l<="Z"||"0"<=l&&l<="9"||l==="_"||l==="$"||l===")"||l==="]"){y=false}else if(l===" "||l===" "||l==="\n"||l==="\r"){}else{y=true}}f=u;if(h===null){if(l==="."){u=true}else if(l===" "||l===" "||l==="\n"||l==="\r"){}else{u=false}}if(l==='"'&&h===null){h="double";o++}else if(l==="'"&&h===null){h="single";o++}else if(l==="/"&&h===null&&p){h="slash";o++}else if(l==='"'&&h==="double"||l==="'"&&h==="single"||l==="/"&&h==="slash"){h=null;o++}else if(l==="\\"&&h!==null){o+=2}else if(l==="("){c++;o++}else if(l==="["){i++;o++}else if(l==="{"){r++;o++}else if(l===")"){c--;o++}else if(l==="]"){i--;o++}else if(l==="}"){r--;o++}else if(h===null&&!f&&(c===i&&i===r&&r===0)){if(s===0){if(l===":"){t=e.substr(o+1);e=e.substr(0,o);break}}else if(s===1){m=e.substr(o);if((a=m.match(/^=([^]+)$/))!=null){n={type:"equal",components:[e.substr(0,o),a[1]]};break}else if((a=m.match(/^<>([^]+)$/))!=null){n={type:"notEqual",components:[e.substr(0,o),a[1]]};break}else if((a=m.match(/^\sis\s([^]+)$/))!=null){n={type:"is",components:[e.substr(0,o),a[1]]};break}else if((a=m.match(/^\sisnt\s([^]+)$/))!=null){n={type:"isnt",components:[e.substr(0,o),a[1]]};break}else if((a=m.match(/^\sthrows(?:\s([^]+))?$/))!=null){n={type:"throws",components:[e.substr(0,o),a[1]!=null?a[1]:"undefined"]};break}else if((a=m.match(/^<=([^]+)$/))!=null){n={type:"lessThanOrEqual",components:[e.substr(0,o),a[1]]};break}else if((a=m.match(/^>=([^]+)$/))!=null){n={type:"greaterThanOrEqual",components:[e.substr(0,o),a[1]]};break}else if((a=m.match(/^<([^]+)$/))!=null){n={type:"lessThan",components:[e.substr(0,o),a[1]]};break}else if((a=m.match(/^>([^]+)$/))!=null){n={type:"greaterThan",components:[e.substr(0,o),a[1]]};break}}o++}else{o++}}if(s===1){return n!=null?n:n={type:"doesNotThrow",components:[e]}}});n.components.push(JSON.stringify((t!=null?t:e).trim()));return n};npmWishlist.parseWishes=function(e){var t,n,s,r,i,l,u,o,a,f,p,c;a=null;u=0;n=0;t=0;c=true;o=[];r=0;while(r<e.length){s=e[r];l=c;if(a===null){if("a"<=s&&s<="z"||"A"<=s&&s<="Z"||"0"<=s&&s<="9"||s==="_"||s==="$"||s===")"||s==="]"){c=false}else if(s===" "||s===" "||s==="\n"||s==="\r"){}else{c=true}}if(s==='"'&&a===null){a="double";r++}else if(s==="'"&&a===null){a="single";r++}else if(s==="/"&&a===null&&l){a="slash";r++}else if(s==='"'&&a==="double"||s==="'"&&a==="single"||s==="/"&&a==="slash"){a=null;r++}else if(s==="\\"&&a!==null){r+=2}else if(s==="("){u++;r++}else if(s==="["){n++;r++}else if(s==="{"){t++;r++}else if(s===")"){u--;r++}else if(s==="]"){n--;r++}else if(s==="}"){t--;r++}else if(a===null&&(u===n&&n===t&&t===0)&&s===";"){o.push(r);r++}else{r++}}f=[];i=-1;o.forEach(function(t){var n;n=e.substring(i+1,t).trim();if(n!==""){f.push(n)}return i=t});p=e.substr(i+1).trim();if(p!==""){f.push(p)}return f};npmWishlist.sha256=function(e){var t,n,s,r,i,l,u,o,a,f,p,c,h,m,y,g,d,v,b,W,T,_,w,x,j,k,A,E,M,O,z,S,I,$,N,q,C,Z,R,J;if(e.length>Math.round(Math.pow(2,31)-1)){throw new Error}I=function(e){var t;return function(){var n,s;s=[];for(t=n=7;n>=0;t=--n){s.push(((e>>>t*4)%16).toString(16))}return s}().join("")};y=function(){var e,t,n,s;t=0;for(n=0,s=arguments.length;n<s;n++){e=arguments[n];t=(t+e)%4294967296}return t};u=function(e,t){return e>>>t|e<<32-t};o=function(e,t){return e>>>t};t=function(e,t,n){return e&t^~e&n};i=function(e,t,n){return e&t^e&n^t&n};a=function(e){return u(e,2)^u(e,13)^u(e,22)};f=function(e){return u(e,6)^u(e,11)^u(e,25)};O=function(e){return u(e,7)^u(e,18)^o(e,3)};z=function(e){return u(e,17)^u(e,19)^o(e,10)};s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];n=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];d=e.split("").map(function(e){return e.charCodeAt(0)});A=e.length*8;k=448-A-1;while(k<0){k+=512}M=A+1+k+64;d.push(128);for(x=$=0,J=Math.round((k-7)/8);0<=J?$<J:$>J;x=0<=J?++$:--$){d.push(0)}d.push(0);d.push(0);d.push(0);d.push(0);d.push(A>>>24);d.push((A>>>16)%256);d.push((A>>>8)%256);d.push(A%256);l=Math.round(M/512);r=new Array(l);for(x=N=0;0<=l?N<l:N>l;x=0<=l?++N:--N){r[x]=new Array(16);for(j=q=0;q<16;j=++q){E=x*64+j*4;r[x][j]=d[E]<<24|d[E+1]<<16|d[E+2]<<8|d[E+3]}}h=new Array(64);for(x=C=0;0<=l?C<l:C>l;x=0<=l?++C:--C){for(S=Z=0;Z<64;S=++Z){h[S]=S<16?r[x][S]:y(z(h[S-2]),h[S-7],O(h[S-15]),h[S-16])}m=n[0];g=n[1];v=n[2];b=n[3];W=n[4];T=n[5];_=n[6];w=n[7];for(S=R=0;R<64;S=++R){p=y(w,f(W),t(W,T,_),s[S],h[S]);c=y(a(m),i(m,g,v));w=_;_=T;T=W;W=y(b,p);b=v;v=g;g=m;m=y(p,c)}n[0]=y(m,n[0]);n[1]=y(g,n[1]);n[2]=y(v,n[2]);n[3]=y(b,n[3]);n[4]=y(W,n[4]);n[5]=y(T,n[5]);n[6]=y(_,n[6]);n[7]=y(w,n[7])}return n.map(function(e){return I(e)}).join("")};npmWishlist.Test=function(){function Test(e){this.description=e!=null?e:"";this._children=[];this.fun=function(e){return function(){}}(this);this.wishes=[];this.async=false;this.parent=null;this._resetContext()}Test.prototype._resetContext=function(){this.env={};this.wishResults=[];return this.result=null};Test.prototype.set=function(){var e,t,n,s,r,i;e=t=i=r=s=void 0;n=function(e){return function(e){var t;t=Array.isArray(e)?e.join(";"):typeof e==="string"?e:"";return npmWishlist.parseWishes(t)}}(this);if(typeof arguments[0]==="string"){e=arguments[0];t=arguments[1];if(typeof arguments[2]==="object"&&arguments[2]!==null&&!Array.isArray(arguments[2])){s=arguments[2]}else{r=arguments[2];s=arguments[3]}}else{t=arguments[0];if(typeof arguments[1]==="object"&&arguments[1]!==null&&!Array.isArray(arguments[1])){s=arguments[1]}else{r=arguments[1];s=arguments[2]}}i=n(r);if(s==null){s={}}if(e!==void 0){this.description=e}this.fun=t;if(r!==void 0){this.wishes=i}if(s.async!==void 0){this.async=s.async}return this};Test.prototype.setAsync=function(){var e,t,n,s,r;e=[];for(s=0,r=arguments.length;s<r;s++){n=arguments[s];e.push(n)}t=e[e.length-1];if(typeof t==="object"&&t!==null&&!Array.isArray(t)){t.async=true}else{e.push({async:true})}return this.set.apply(this,e)};Test.prototype.add=function(){var e;e=null;if(arguments[0]instanceof npmWishlist.Test){e=arguments[0]}else{e=new npmWishlist.Test;e.set.apply(e,arguments)}e.parent=this;this._children.push(e);return this};Test.prototype.addAsync=function(){var e,t,n,s,r;e=[];for(s=0,r=arguments.length;s<r;s++){n=arguments[s];e.push(n)}t=e[e.length-1];if(typeof t==="object"&&t!==null&&!Array.isArray(t)){t.async=true}else{e.push({async:true})}return this.add.apply(this,e)};Test.prototype.getChildren=function(){return this._children.slice(0)};Test.prototype.getAncestors=function(){var e,t;t=this;e=[];while(t.parent!==null){e.push(t.parent);t=t.parent}return e};Test.prototype.run=function(e){var t,n,s,r;if(e==null){e=true}if(e){npmWishlist.currentRootTest=this}this._resetContext();if(this.parent!=null){this.env=npmWishlist.objectClone(this.parent.env)}setTimeout(function(e){return function(){var t;if(npmWishlist.environmentType==="node"){t=module.require("domain").create();t.on("error",function(t){return e.end({type:false,errorMessage:"Error Name: "+t.name+"\nError Message: "+t.message+"\nError Stack: "+t.stack})});t.run(function(){return e.fun(e.env,e)})}else{try{e.fun(e.env,e)}catch(t){e.end({type:false})}}if(e.result==null&&!e.async){return e.end({type:true})}}}(this),0);if(e){t=[];t.push(this);r=function(e){return function(e){return e.getChildren().forEach(function(e){t.push(e);return r(e)})}}(this);r(this);console.log();s=function(e){return function(){var s,r,i,l,u,o,a;u=t.filter(function(e){return e.result!=null&&e.result.type===true});s=t.filter(function(e){return e.result!=null&&e.result.type===false});o=t.filter(function(e){return e.result==null});console.log(""+(new Date).toISOString()+" OK: "+u.length+", "+("Exception: "+s.length+", Pending: "+o.length));if(o.length===0){clearInterval(n);s.forEach(function(e){console.log("\n********** Exceptional Test **********");console.log("Test: "+e.description);console.log("Function: "+e.fun.toString());if(e.result.errorMessage!=null){return console.log(e.result.errorMessage)}});r=0;a=0;l="";t.forEach(function(e){return e.wishResults.forEach(function(t){var n,s;l+=" "+t.type.toString();if(t.type===false){r++;n=e.getAncestors();n.reverse();s=n.concat([e]).map(function(e){return e.description}).join(" --> ");console.log("\n********** Broken Wish **********");console.log(" Test: "+s);console.log(" Wish: "+t.description);console.log("Expected: "+t.expected);return console.log(" Actual: "+t.actual)}else{return a++}})});l=l.trim();i=npmWishlist.sha256(l).substr(0,5);console.log("\n"+((s.length===0?"Tests OK.":""+s.length+" tests of "+t.length+" exceptional.")+" "+(r===0?"Wishes fulfilled.":""+r+" wishes of "+(r+a)+" broken.")+" "+("Mark: "+i))+"\n");e.allEnded=true;return npmWishlist.currentRootTest=null}}}(this);n=setInterval(s,1e3);setTimeout(s,10)}return this};Test.prototype.end=function(e){if(this.result==null){this.result=e!=null?e:{type:true};this.wishes.forEach(function(e){return function(t){return e._checkWish(t)}}(this));this.getChildren().forEach(function(e){return function(e){return e.run(false)}}(this))}return this};Test.prototype._checkWish=function(wishStr){var args,description,interpret,parsed,result,that;that=this;interpret=function(e){return function(t){npmWishlist.parseExpression(t,Object.keys(e.env)).forEach(function(e,n){var s,r;s="that.env.";r=e+s.length*n;return t=t.substr(0,r)+s+t.substr(r)});return t}}(this);parsed=npmWishlist.parseWish(wishStr);args=parsed.components.map(function(e){return function(e,t){if(t===parsed.components.length-1){return e}else{return interpret(e)}}}(this));description=JSON.parse(args[args.length-1]);result=function(){try{args=args.map(function(_this){return function(m){return eval("(("+m+"))")}}(this));return this["_check_"+parsed.type].apply(this,args)}catch(e){return{type:false,description:description,actual:"unknown",expected:"unknown"}}}.call(this);return this.wishResults.push(result)};Test.prototype.wish=function(e){return npmWishlist.parseWishes(e).forEach(function(e){return function(t){return e._checkWish(t)}}(this))};return Test}();npmWishlist.Test.prototype._check_equal=function(e,t,n){var s,r,i;if(n==null){n=""}r=[];s=function(e){return function(e,t){if(Array.isArray(e)&&Array.isArray(t)){if(t.every(function(t,n){if(__indexOf.call(r,t)>=0){return npmWishlist.objectIs(e[n],t)}else{if(typeof t==="object"&&t!==null){r.push(t)}return s(e[n],t)}})){return true}else{return false}}else if(typeof e==="object"&&e!==null&&typeof t==="object"&&t!==null){if(Object.keys(t).every(function(n){var i;if(i=t[n],__indexOf.call(r,i)>=0){return npmWishlist.objectIs(e[n],t[n])}else{if(typeof t[n]==="object"&&t[n]!==null){r.push(t[n])}return s(e[n],t[n])}})){return true}else{return false}}else{return npmWishlist.objectIs(e,t)}}}(this);i={type:s(e,t),description:n};if(i.type===false){i.actual=npmWishlist.valueToMessage(e);i.expected="= "+npmWishlist.valueToMessage(t)}return i};npmWishlist.Test.prototype._check_notEqual=function(e,t,n){var s,r,i;if(n==null){n=""}r=[];s=function(e){return function(e,t){if(Array.isArray(e)&&Array.isArray(t)){if(t.some(function(t,n){if(__indexOf.call(r,t)>=0){return!npmWishlist.objectIs(e[n],t)}else{if(typeof t==="object"&&t!==null){r.push(t)}return s(e[n],t)}})){return true}else{return false}}else if(typeof e==="object"&&e!==null&&typeof t==="object"&&t!==null){if(Object.keys(t).some(function(n){var i;if(i=t[n],__indexOf.call(r,i)>=0){return!npmWishlist.objectIs(e[n],t[n])}else{if(typeof t[n]==="object"&&t[n]!==null){r.push(t[n])}return s(e[n],t[n])}})){return true}else{return false}}else{return!npmWishlist.objectIs(e,t)}}}(this);i={type:s(e,t),description:n};if(i.type===false){i.actual=npmWishlist.valueToMessage(e);i.expected="≠ "+npmWishlist.valueToMessage(t)}return i};npmWishlist.Test.prototype._check_is=function(e,t,n){var s;if(n==null){n=""}s={type:npmWishlist.objectIs(e,t),description:n};if(s.type===false){s.actual=npmWishlist.valueToMessage(e);s.expected="is "+npmWishlist.valueToMessage(t)}return s};npmWishlist.Test.prototype._check_isnt=function(e,t,n){var s;if(n==null){n=""}s={type:!npmWishlist.objectIs(e,t),description:n};if(s.type===false){s.actual=npmWishlist.valueToMessage(e);s.expected="isn't "+npmWishlist.valueToMessage(t)}return s};npmWishlist.Test.prototype._check_throws=function(e,t,n){var s,r,i,l;if(n==null){n=""}r=false;l=function(){try{e();r=true;return false}catch(e){s=e;if(t==null){return true}else if(t instanceof RegExp){if(t.test(s.message)){return true}else{return false}}else{if(s instanceof t){return true}else{return false}}}}();i={type:l,description:n};if(i.type===false){i.actual=r?"no exception":"another exception";i.expected=r?"exception":"an exception"}return i};npmWishlist.Test.prototype._check_doesNotThrow=function(e,t){var n,s;if(t==null){t=""}s=function(){try{e();return true}catch(e){return false}}();n={type:s,description:t};if(n.type===false){n.actual="exception";n.expected="no exception"}return n};npmWishlist.Test.prototype._check_lessThan=function(e,t,n){var s;if(n==null){n=""}s={type:e<t,description:n};if(s.type===false){s.actual=npmWishlist.valueToMessage(e);s.expected="< "+npmWishlist.valueToMessage(t)}return s};npmWishlist.Test.prototype._check_lessThanOrEqual=function(e,t,n){var s;if(n==null){n=""}s={type:e<=t,description:n};if(s.type===false){s.actual=npmWishlist.valueToMessage(e);s.expected="<= "+npmWishlist.valueToMessage(t)}return s};npmWishlist.Test.prototype._check_greaterThan=function(e,t,n){var s;if(n==null){n=""}s={type:e>t,description:n};if(s.type===false){s.actual=npmWishlist.valueToMessage(e);s.expected="> "+npmWishlist.valueToMessage(t)}return s};npmWishlist.Test.prototype._check_greaterThanOrEqual=function(e,t,n){var s;if(n==null){n=""}s={type:e>=t,description:n};if(s.type===false){s.actual=npmWishlist.valueToMessage(e);s.expected=">= "+npmWishlist.valueToMessage(t)}return s};if(npmWishlist.environmentType==="browser"){window.npmWishlist=npmWishlist}if(npmWishlist.moduleSystem==="commonjs"){module.exports=npmWishlist}npmWishlist.packageInfo={name:"wishlist",version:"0.2.6",description:"Super natural testing framework.",keywords:["test","testing","async","unit","bdd","tdd","asynchronous","assertion","assert","mocha","qunit","karma","jasmine","vows","qunitjs","chai"],author:"Zhenzhen Zhan <zhanzhenzhen@hotmail.com>",homepage:"http://zhanzhenzhen.github.io/wishlist/",licenses:[{type:"MIT",url:"https://github.com/zhanzhenzhen/wishlist/blob/master/LICENSE.txt"}],repository:{type:"git",url:"https://github.com/zhanzhenzhen/wishlist.git"},devDependencies:{"coffee-script":"1.7.1","uglify-js":"2.4.13"},main:"wishlist"}}).call(this); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
137241
1632