-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[@dhealthdapps/backend] test: update & add unit tests
- Loading branch information
Showing
22 changed files
with
1,842 additions
and
55 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
27 changes: 27 additions & 0 deletions
27
runtime/backend/tests/unit/common/events/OnAuthClosed.spec.ts
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* This file is part of dHealth dApps Framework shared under LGPL-3.0 | ||
* Copyright (C) 2022-present dHealth Network, All rights reserved. | ||
* | ||
* @package dHealth dApps Framework | ||
* @subpackage Backend | ||
* @author dHealth Network <[email protected]> | ||
* @license LGPL-3.0 | ||
*/ | ||
// internal dependencies | ||
import { OnAuthClosed } from "../../../../src/common/events/OnAuthClosed"; | ||
|
||
describe("common/OnAuthClosed", () => { | ||
describe("create()", () => { | ||
it("should run correctly & return correct instance", () => { | ||
// prepare | ||
[null, "test-challenge"].forEach((challenge: string) => { | ||
// act | ||
const result = OnAuthClosed.create(challenge); | ||
|
||
// assert | ||
expect(result).toBeDefined(); | ||
expect(result.challenge).toBe(challenge); | ||
}); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.