From d744cecbfa0ae64c4fddccae0dad7bbeaf2b81aa Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 7 Feb 2017 22:56:16 +0000 Subject: [PATCH] Make the tests work without olm Olm is an optional dependency, so the tests should work without it. --- spec/unit/crypto.spec.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spec/unit/crypto.spec.js b/spec/unit/crypto.spec.js index eb0747d3d..6f347bb49 100644 --- a/spec/unit/crypto.spec.js +++ b/spec/unit/crypto.spec.js @@ -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); });