Skip to content
Permalink
Browse files

Fixing that 0 tests ran in the CI logs.

So apparently, using QUnitAdapter still requires some "porting" from plain QUnit
code. Or maybe QUnitAdapter is way outdated?
  • Loading branch information...
skytreader committed Jun 29, 2015
1 parent 2ec7cac commit 1cbcb61790b4781b2765bc6c60a61499a1fabf85
Showing with 20 additions and 16 deletions.
  1. +4 −0 jsTestDriver.conf
  2. +11 −11 librarian/static/scripts/tests/isbn-verify.js
  3. +5 −5 librarian/static/scripts/tests/visual-queue.js
@@ -1,7 +1,11 @@
server: http://localhost:16981

load:
- librarian/static/scripts/jquery.js
- librarian/static/scripts/qunit-1.17.1.js
- librarian/static/scripts/equiv.js
- librarian/static/scripts/QUnitAdapter.js
- librarian/static/scripts/utils/isbn-verify.js
- librarian/static/scripts/tests/isbn-verify.js
- librarian/static/scripts/utils/visual-queue.js
- librarian/static/scripts/tests/visual-queue.js
@@ -1,16 +1,16 @@
QUnit.test("stripExtraneousTest", function(assert){
assert.equal(stripExtraneous("3.1 4 1 5 92-653"), "3141592653");
test("stripExtraneousTest", function(assert){
equals(stripExtraneous("3.1 4 1 5 92-653"), "3141592653", "test");
});

QUnit.test("isbn13Test", function(assert){
assert.ok(verifyISBN13("9780981467306"), "Positive test");
assert.ok(!verifyISBN13("0156453800"), "Negative test, wrong length");
assert.ok(!verifyISBN13("3141592653589"), "Negative test, ok length");
test("isbn13Test", function(assert){
ok(verifyISBN13("9780981467306"), "Positive test");
ok(!verifyISBN13("0156453800"), "Negative test, wrong length");
ok(!verifyISBN13("3141592653589"), "Negative test, ok length");
});

QUnit.test("isbn10Test", function(assert){
assert.ok(verifyISBN10("0156453800"));
assert.ok(verifyISBN10("1553650808"));
assert.ok(!verifyISBN10("9780981467306"), "Negative test, wrong length");
assert.ok(!verifyISBN10("3141592653"), "Negative test, ok length");
test("isbn10Test", function(assert){
ok(verifyISBN10("0156453800"));
ok(verifyISBN10("1553650808"));
ok(!verifyISBN10("9780981467306"), "Negative test, wrong length");
ok(!verifyISBN10("3141592653"), "Negative test, ok length");
});
@@ -1,14 +1,14 @@
QUnit.module("Q Tests", {
"beforeEach":function(){
module("Q Tests", {
"setup":function(){
var qContainer = document.createElement("div");
this.q = new VisualQueue(qContainer, null);
}
});
QUnit.test("simple count test", function(assert){
test("simple count test", function(assert){
var item1 = document.createElement("div");
item1.id = "item1";
this.q.enqueue(item1);
assert.equal(this.q.queueCounter, 1);
equals(this.q.queueCounter, 1, "one item");
this.q.remove(item1.id);
assert.equal(this.q.queueCounter, 0);
equals(this.q.queueCounter, 0, "no more items");
});

0 comments on commit 1cbcb61

Please sign in to comment.
You can’t perform that action at this time.