Permalink
Browse files

Code coverage at 92%

  • Loading branch information...
1 parent a9e82b0 commit cb53cbca726c1d05b23e109bb815dce50de0f360 @weikinhuang committed May 4, 2012
Showing with 17 additions and 1 deletion.
  1. +17 −1 test/export.js
View
@@ -93,7 +93,7 @@ QUnit.test("invoking global Classify object with object", function() {
});
QUnit.test("constructing global Classify object", function() {
- QUnit.expect(9);
+ QUnit.expect(10);
var definition = {
a : 0,
init : function(a) {
@@ -122,4 +122,20 @@ QUnit.test("constructing global Classify object", function() {
QUnit.ok(new Classify("Export3", "E", [ 1 ]) instanceof test, "instantiated Classify object with parameters is an instance of the instantiated class");
QUnit.ok(!(new Classify("Export3", "E", [ 1 ]) instanceof Classify), "instantiated Classify object with parameters is not an instance of the instantiated Classify");
+
+ try {
+ var test2 = new Classify();
+ } catch (e) {
+ QUnit.ok(e instanceof Error, "Calling Classify with no arguments throws an error.");
+ }
+});
+
+QUnit.test("using noConflict mode", function() {
+ QUnit.expect(1);
+
+ var original = Classify;
+
+ var temp = Classify.noConflict();
+
+ QUnit.equal(original, temp, "no conflict mode returned defined classify object");
});

0 comments on commit cb53cbc

Please sign in to comment.