up
This commit is contained in:
parent
c893042857
commit
2b99225d29
2 changed files with 11 additions and 2 deletions
|
|
@ -15,11 +15,13 @@ export class BitcoinCoreWrapper {
|
|||
timeout: 5 * 60 * 1000,
|
||||
})
|
||||
}
|
||||
|
||||
InitAddress = async () => {
|
||||
this.addr = await this.core.getNewAddress()
|
||||
}
|
||||
Init = async () => {
|
||||
const wallet = await this.core.createWallet('');
|
||||
console.log({ wallet })
|
||||
this.addr = await this.core.getNewAddress()
|
||||
await this.InitAddress()
|
||||
console.log({ addr: this.addr })
|
||||
await this.Mine(101)
|
||||
const info = await this.core.getWalletInfo();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
import { globby } from 'globby'
|
||||
import { LoadTestSettingsFromEnv } from '../services/main/settings.js'
|
||||
import { BitcoinCoreWrapper } from './bitcoinCore.js'
|
||||
import { setupNetwork } from './networkSetup.js'
|
||||
import { Describe, SetupTest, teardown, TestBase } from './testBase.js'
|
||||
|
||||
|
|
@ -22,6 +24,11 @@ const getDescribe = (fileName: string): Describe => {
|
|||
const start = async () => {
|
||||
if (process.argv[2] === 'setup_network') {
|
||||
await setupNetwork()
|
||||
} else {
|
||||
const core = new BitcoinCoreWrapper(LoadTestSettingsFromEnv())
|
||||
await core.InitAddress()
|
||||
await core.Mine(1)
|
||||
await new Promise((resolve) => setTimeout(resolve, 1000))
|
||||
}
|
||||
const files = await globby(["**/*.spec.js", "!**/node_modules/**"])
|
||||
const modules: { file: string, module: TestModule }[] = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue