mirror of
https://github.com/Permissionless-Software-Foundation/ipfs-bch-wallet-service.git
synced 2026-09-21 16:52:03 -07:00
Fixing tests
This commit is contained in:
@@ -16,7 +16,7 @@ describe('#IPFS-adapter-index', () => {
|
||||
let bchjs
|
||||
|
||||
beforeEach(() => {
|
||||
bchjs = new BCHJS()
|
||||
bchjs = new BCHJS({ restURL: 'https://api.fullstack.cash/v5/' })
|
||||
uut = new IPFSLib({ bchjs })
|
||||
|
||||
sandbox = sinon.createSandbox()
|
||||
|
||||
@@ -107,7 +107,7 @@ describe('#wallet', () => {
|
||||
describe('#instanceWalletWithoutInitialization', () => {
|
||||
it('should create an instance of BchWallet', async () => {
|
||||
// Create a mock wallet.
|
||||
const mockWallet = new BchWallet()
|
||||
const mockWallet = new BchWallet(undefined, { restURL: 'https://api.fullstack.cash/v5/' })
|
||||
await mockWallet.walletInfoPromise
|
||||
sandbox.stub(mockWallet, 'initialize').resolves()
|
||||
|
||||
@@ -143,7 +143,7 @@ describe('#wallet', () => {
|
||||
|
||||
it('should create an instance of BchWallet using web2 infra', async () => {
|
||||
// Create a mock wallet.
|
||||
const mockWallet = new BchWallet()
|
||||
const mockWallet = new BchWallet(undefined, { restURL: 'https://api.fullstack.cash/v5/' })
|
||||
await mockWallet.walletInfoPromise
|
||||
sandbox.stub(mockWallet, 'initialize').resolves()
|
||||
|
||||
@@ -166,7 +166,7 @@ describe('#wallet', () => {
|
||||
|
||||
it('should generate wallet from mnemonic in config', async () => {
|
||||
// Create a mock wallet.
|
||||
const mockWallet = new BchWallet()
|
||||
const mockWallet = new BchWallet(undefined, { restURL: 'https://api.fullstack.cash/v5/' })
|
||||
await mockWallet.walletInfoPromise
|
||||
sandbox.stub(mockWallet, 'initialize').resolves()
|
||||
|
||||
@@ -194,7 +194,7 @@ describe('#wallet', () => {
|
||||
describe('#instanceWallet', () => {
|
||||
it('should create an instance of BchWallet', async () => {
|
||||
// Create a mock wallet.
|
||||
const mockWallet = new BchWallet()
|
||||
const mockWallet = new BchWallet(undefined, { restURL: 'https://api.fullstack.cash/v5/' })
|
||||
await mockWallet.walletInfoPromise
|
||||
sandbox.stub(mockWallet, 'initialize').resolves()
|
||||
|
||||
@@ -227,7 +227,7 @@ describe('#wallet', () => {
|
||||
|
||||
it('should create an instance of BchWallet using web2 infra', async () => {
|
||||
// Create a mock wallet.
|
||||
const mockWallet = new BchWallet()
|
||||
const mockWallet = new BchWallet(undefined, { restURL: 'https://api.fullstack.cash/v5/' })
|
||||
await mockWallet.walletInfoPromise
|
||||
sandbox.stub(mockWallet, 'initialize').resolves()
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ class MockBchWallet {
|
||||
this.walletInfoPromise = true;
|
||||
this.walletInfo = mockWallet;
|
||||
this.initialize = async () => {}
|
||||
this.bchjs = new BCHJS();
|
||||
this.bchjs = new BCHJS({ restURL: 'https://api.fullstack.cash/v5/' });
|
||||
this.burnTokens = async () => {
|
||||
return { success: true, txid: 'txid' };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user