Fixing tests

This commit is contained in:
Chris Troutner
2026-01-28 17:12:04 -07:00
parent dc3ef76e00
commit 96b3a98929
3 changed files with 7 additions and 7 deletions
@@ -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()
+5 -5
View File
@@ -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()
+1 -1
View File
@@ -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' };
};