-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: modal not updating * chore: add code coverage
- Loading branch information
1 parent
d3f4208
commit 251e8d5
Showing
2 changed files
with
39 additions
and
3 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
21 changes: 21 additions & 0 deletions
21
packages/dapp-kit-ui/test/classes/connect-modal-manager.test.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,21 @@ | ||
import { ConnectModalManager, DAppKitUI } from '../../src'; | ||
|
||
DAppKitUI.configure({ | ||
nodeUrl: 'https://mainnet.vechain.org/', | ||
}); | ||
|
||
describe('ConnectModalManager', () => { | ||
it('should be a singleton', () => { | ||
const instance1 = ConnectModalManager.getInstance(DAppKitUI.wallet); | ||
const instance2 = ConnectModalManager.getInstance(DAppKitUI.wallet); | ||
expect(instance1).toBe(instance2); | ||
}); | ||
|
||
it('should not throw', () => { | ||
const instance = ConnectModalManager.getInstance(DAppKitUI.wallet); | ||
instance.open(); | ||
instance.close(); | ||
instance.closeWalletConnect(); | ||
instance.closeConnectionCertificateRequest(); | ||
}); | ||
}); |