Skip to content

Commit

Permalink
test(web): add test for retrieving the CC version
Browse files Browse the repository at this point in the history
  • Loading branch information
typfel committed Jan 20, 2025
1 parent 2b6c378 commit 7fe0d84
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions crypto-ffi/bindings/js/test/CoreCrypto.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,19 @@ describe("build", () => {
});
});

describe("build", () => {
it("version can be retrieved and is a semantic version number", async () => {
await expect(
browser.execute(async () => window.ccModule.version())
).resolves.toMatch(
RegExp(
// Regex for matching semantic versions from https://semver.org
"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"
)
);
});
});

describe("Error type mapping", () => {
it("should work for conversation already exists", async () => {
await ccInit(ALICE_ID);
Expand Down

0 comments on commit 7fe0d84

Please sign in to comment.