mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-06-13 15:41:01 +00:00
keyringOption expose
This commit is contained in:
@@ -2,20 +2,18 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { KeyringStruct } from '../types';
|
||||
import { KeyringOption } from '.';
|
||||
|
||||
const keyringOptionInstance = new KeyringOption();
|
||||
import keyringOption from '.';
|
||||
|
||||
describe('KeyringOption', (): void => {
|
||||
it('should not allow initOptions to be called more than once', (): void => {
|
||||
const state: Partial<KeyringStruct> = {};
|
||||
|
||||
// first call
|
||||
keyringOptionInstance.init(state as KeyringStruct);
|
||||
keyringOption.init(state as KeyringStruct);
|
||||
|
||||
// second call
|
||||
expect((): void => {
|
||||
keyringOptionInstance.init(state as KeyringStruct);
|
||||
keyringOption.init(state as KeyringStruct);
|
||||
}).toThrowError('Unable to initialise options more than once');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -138,3 +138,7 @@ export class KeyringOption implements KeyringOptionInstance {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
const keyringOption = new KeyringOption();
|
||||
|
||||
export default keyringOption;
|
||||
|
||||
Reference in New Issue
Block a user