-
-
Notifications
You must be signed in to change notification settings - Fork 585
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #743 from matrix-org/dbkr/wasm
Update to WebAssembly-powered Olm
- Loading branch information
Showing
7 changed files
with
53 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,23 @@ | ||
|
||
"use strict"; | ||
import 'source-map-support/register'; | ||
import Crypto from '../../lib/crypto'; | ||
import expect from 'expect'; | ||
|
||
const sdk = require("../.."); | ||
let Crypto; | ||
if (sdk.CRYPTO_ENABLED) { | ||
Crypto = require("../../lib/crypto"); | ||
} | ||
|
||
import expect from 'expect'; | ||
const Olm = global.Olm; | ||
|
||
describe("Crypto", function() { | ||
if (!sdk.CRYPTO_ENABLED) { | ||
return; | ||
} | ||
|
||
beforeEach(function(done) { | ||
Olm.init().then(done); | ||
}); | ||
|
||
it("Crypto exposes the correct olm library version", function() { | ||
expect(Crypto.getOlmVersion()[0]).toEqual(2); | ||
expect(Crypto.getOlmVersion()[0]).toEqual(3); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters