www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 2e8e3ffa5df4c538e251b162466327d07713eb6f
parent d857a0666145f7788b03bba43f0e46ab953e39cf
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sat, 24 Sep 2016 06:43:57 -0400

Add test for Zotero.Utilities.Internal.md5()

(Though md5Async() should generally be used instead)

Diffstat:
Mtest/tests/utilities_internalTest.js | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/test/tests/utilities_internalTest.js b/test/tests/utilities_internalTest.js @@ -1,6 +1,17 @@ "use strict"; 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 () { it("should generate hex string given file path", function* () { var file = OS.Path.join(getTestDataDirectory().path, 'test.png');