Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
1 parent
2ec7cac
commit 1cbcb61
Showing
3 changed files
with
20 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,7 +1,11 @@ | |||
server: http://localhost:16981 | server: http://localhost:16981 | ||
|
|
||
load: | load: | ||
- librarian/static/scripts/jquery.js | |||
- librarian/static/scripts/qunit-1.17.1.js | |||
- librarian/static/scripts/equiv.js | - librarian/static/scripts/equiv.js | ||
- librarian/static/scripts/QUnitAdapter.js | - librarian/static/scripts/QUnitAdapter.js | ||
- librarian/static/scripts/utils/isbn-verify.js | |||
- librarian/static/scripts/tests/isbn-verify.js | - librarian/static/scripts/tests/isbn-verify.js | ||
- librarian/static/scripts/utils/visual-queue.js | |||
- librarian/static/scripts/tests/visual-queue.js | - librarian/static/scripts/tests/visual-queue.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,16 +1,16 @@ | |||
QUnit.test("stripExtraneousTest", function(assert){ | test("stripExtraneousTest", function(assert){ | ||
assert.equal(stripExtraneous("3.1 4 1 5 92-653"), "3141592653"); | equals(stripExtraneous("3.1 4 1 5 92-653"), "3141592653", "test"); | ||
}); | }); | ||
|
|
||
QUnit.test("isbn13Test", function(assert){ | test("isbn13Test", function(assert){ | ||
assert.ok(verifyISBN13("9780981467306"), "Positive test"); | ok(verifyISBN13("9780981467306"), "Positive test"); | ||
assert.ok(!verifyISBN13("0156453800"), "Negative test, wrong length"); | ok(!verifyISBN13("0156453800"), "Negative test, wrong length"); | ||
assert.ok(!verifyISBN13("3141592653589"), "Negative test, ok length"); | ok(!verifyISBN13("3141592653589"), "Negative test, ok length"); | ||
}); | }); | ||
|
|
||
QUnit.test("isbn10Test", function(assert){ | test("isbn10Test", function(assert){ | ||
assert.ok(verifyISBN10("0156453800")); | ok(verifyISBN10("0156453800")); | ||
assert.ok(verifyISBN10("1553650808")); | ok(verifyISBN10("1553650808")); | ||
assert.ok(!verifyISBN10("9780981467306"), "Negative test, wrong length"); | ok(!verifyISBN10("9780981467306"), "Negative test, wrong length"); | ||
assert.ok(!verifyISBN10("3141592653"), "Negative test, ok length"); | ok(!verifyISBN10("3141592653"), "Negative test, ok length"); | ||
}); | }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,14 +1,14 @@ | |||
QUnit.module("Q Tests", { | module("Q Tests", { | ||
"beforeEach":function(){ | "setup":function(){ | ||
var qContainer = document.createElement("div"); | var qContainer = document.createElement("div"); | ||
this.q = new VisualQueue(qContainer, null); | this.q = new VisualQueue(qContainer, null); | ||
} | } | ||
}); | }); | ||
QUnit.test("simple count test", function(assert){ | test("simple count test", function(assert){ | ||
var item1 = document.createElement("div"); | var item1 = document.createElement("div"); | ||
item1.id = "item1"; | item1.id = "item1"; | ||
this.q.enqueue(item1); | this.q.enqueue(item1); | ||
assert.equal(this.q.queueCounter, 1); | equals(this.q.queueCounter, 1, "one item"); | ||
this.q.remove(item1.id); | this.q.remove(item1.id); | ||
assert.equal(this.q.queueCounter, 0); | equals(this.q.queueCounter, 0, "no more items"); | ||
}); | }); |