Skip to content

Commit

Permalink
Review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
florianduros committed Oct 25, 2023
1 parent 1d6e0ef commit 59f59bf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion spec/unit/crypto.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ describe("Crypto", function () {
expect(Crypto.getOlmVersion()[0]).toEqual(3);
});

it("should return the current version of the olm library", async () => {
it("getVersion() should return the current version of the olm library", async () => {
const client = new TestClient("@alice:example.com", "deviceid").client;
await client.initCrypto();

Expand Down
13 changes: 6 additions & 7 deletions spec/unit/rust-crypto/rust-crypto.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ describe("initRustCrypto", () => {
});

describe("RustCrypto", () => {
it("getVersion() should return the current version of the rust sdk and vodozemac", async () => {
const rustCrypto = await makeTestRustCrypto();
const versions = RustSdkCryptoJs.getVersions();
expect(rustCrypto.getVersion()).toBe(`Rust SDK ${versions.matrix_sdk_crypto}, Vodozemac ${versions.vodozemac}`);
});

describe(".importRoomKeys and .exportRoomKeys", () => {
let rustCrypto: RustCrypto;

Expand All @@ -143,13 +149,6 @@ describe("RustCrypto", () => {
10000,
);

it("should return the current version of the rust sdk and vodozemac", async () => {
const versions = RustSdkCryptoJs.getVersions();
expect(rustCrypto.getVersion()).toBe(
`Rust SDK ${versions.matrix_sdk_crypto}, Vodozemac ${versions.vodozemac}`,
);
});

it("should import and export keys", async () => {
const someRoomKeys = testData.MEGOLM_SESSION_DATA_ARRAY;
let importTotal = 0;
Expand Down
4 changes: 1 addition & 3 deletions src/crypto-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ export interface CryptoApi {

/**
* Return the current version of the crypto module.
* Rust crypto: the format is `Rust SDK ${versions.matrix_sdk_crypto}, Vodozemac ${versions.vodozemac}`
* Old Crypto: the format is `Olm x.x.x`
* XXXX: remove old crypto when we remove support for it
* For example: `Rust SDK ${versions.matrix_sdk_crypto}, Vodozemac ${versions.vodozemac}`.
* @returns the formatted version
*/
getVersion(): string;
Expand Down

0 comments on commit 59f59bf

Please sign in to comment.