Add test for Zotero.Utilities.Internal.md5()
(Though md5Async() should generally be used instead)
This commit is contained in:
parent
d857a06661
commit
2e8e3ffa5d
1 changed files with 11 additions and 0 deletions
|
@ -1,6 +1,17 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
describe("Zotero.Utilities.Internal", function () {
|
describe("Zotero.Utilities.Internal", function () {
|
||||||
|
describe("#md5()", function () {
|
||||||
|
it("should generate hex string given file path", function* () {
|
||||||
|
var file = OS.Path.join(getTestDataDirectory().path, 'test.png');
|
||||||
|
assert.equal(
|
||||||
|
Zotero.Utilities.Internal.md5(Zotero.File.pathToFile(file)),
|
||||||
|
'93da8f1e5774c599f0942dcecf64b11c'
|
||||||
|
);
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
describe("#md5Async()", function () {
|
describe("#md5Async()", function () {
|
||||||
it("should generate hex string given file path", function* () {
|
it("should generate hex string given file path", function* () {
|
||||||
var file = OS.Path.join(getTestDataDirectory().path, 'test.png');
|
var file = OS.Path.join(getTestDataDirectory().path, 'test.png');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue