commit 5c32962bb113fffd856372ff4920f63d8b8f0365
parent ae69fbbd9bd9fcda5afd3a2d88c3b584f4d3c38c
Author: Dan Stillman <dstillman@zotero.org>
Date: Thu, 29 Oct 2015 03:01:35 -0400
Add test for Zotero.Utilities.Internal.md5Async()
Diffstat:
1 file changed, 13 insertions(+), 0 deletions(-)
diff --git a/test/tests/utilities_internalTest.js b/test/tests/utilities_internalTest.js
@@ -0,0 +1,13 @@
+"use strict";
+
+describe("Zotero.Utilities.Internal", function () {
+ describe("#md5Async()", function () {
+ it("should generate hex string given file path", function* () {
+ var file = OS.Path.join(getTestDataDirectory().path, 'test.png');
+ yield assert.eventually.equal(
+ Zotero.Utilities.Internal.md5Async(file),
+ '93da8f1e5774c599f0942dcecf64b11c'
+ );
+ })
+ })
+})