Make the tests work without olm

Olm is an optional dependency, so the tests should work without it.
This commit is contained in:
Richard van der Hoff
2017-02-07 22:56:16 +00:00
parent d453813db4
commit d744cecbfa
+5 -2
View File
@@ -1,13 +1,16 @@
"use strict";
const Crypto = require("../../lib/crypto");
const sdk = require("../..");
let Crypto;
if (sdk.CRYPTO_ENABLED) {
Crypto = require("../../lib/crypto");
}
describe("Crypto", function() {
if (!sdk.CRYPTO_ENABLED) {
return;
}
it("Crypto exposes the correct olm library version", function() {
expect(Crypto.getOlmVersion()[0]).toEqual(2);
});