Skip to content

Commit

Permalink
Merge branch 'main' into run_test_on_merge
Browse files Browse the repository at this point in the history
  • Loading branch information
charleslavon committed Jul 3, 2024
2 parents 627b20c + 5ea996f commit 0e868f1
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions src/lib/near-fastauth-wallet.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
import { setupFastAuthWallet } from './near-fastauth-wallet';

describe('nearFastauthWallet', () => {
it('should work', () => {
expect(setupFastAuthWallet()).toEqual('near-fastauth-wallet');
describe('nearFastAuthWallet', () => {
it('Should create a FastAuthWallet with correct metadata', async () => {
const walletFactory = setupFastAuthWallet({
walletUrl: 'https://wallet.url',
});
expect(walletFactory).toBeInstanceOf(Object);

const factoryOptions = {
languageCode: undefined,
network: {
networkId: 'testnet',
},
debug: false,
optimizeWalletOrder: false,
randomizeWalletOrder: false,
relayerUrl: undefined,
};

const walletModule = await walletFactory({ options: factoryOptions });
expect(walletModule.id).toBe('fast-auth-wallet');
expect(walletModule.type).toBe('browser');
expect(walletModule.metadata.name).toBe('FastAuthWallet');
expect(walletModule.metadata.walletUrl).toBe('https://wallet.url');
});
});

0 comments on commit 0e868f1

Please sign in to comment.