diff --git a/agent/agent.test.ts b/agent/agent.test.ts index 0853ceba7ff..4d1c8e31054 100644 --- a/agent/agent.test.ts +++ b/agent/agent.test.ts @@ -10,8 +10,8 @@ import { import assert from 'node:assert' import { fixture } from '../fixtures/fixtures' -import { TestSuite } from '@hackbg/ensuite' -export default new TestSuite(import.meta.url, [ +import { Suite } from '@hackbg/ensuite' +export default new Suite([ ['errors', testAgentErrors], ['console', testAgentConsole], ['chain', testChain], diff --git a/connect/connect.test.ts b/connect/connect.test.ts index 429f0e98ac2..299466ef034 100644 --- a/connect/connect.test.ts +++ b/connect/connect.test.ts @@ -1,12 +1,14 @@ import connect, { ConnectConfig, ConnectError, ConnectConsole } from './connect' import * as assert from 'node:assert' -import { TestSuite } from '@hackbg/ensuite' -export default new TestSuite(import.meta.url, [ +import { Suite } from '@hackbg/ensuite' +export default new Suite([ ['chains', testConnectChains], ['config', testConnectConfig], ['errors', testConnectErrors], ['console', testConnectConsole], + ['scrt', () => import('./scrt/scrt.test')], + ['cw', () => import('./cw/cw.test')] ]) export async function testConnectChains () { diff --git a/connect/cw/cw.test.ts b/connect/cw/cw.test.ts index 3b9d3563d37..6e885bf9cdc 100644 --- a/connect/cw/cw.test.ts +++ b/connect/cw/cw.test.ts @@ -1,7 +1,6 @@ import { Devnet, CW } from '@hackbg/fadroma' -import { TestSuite } from '@hackbg/ensuite' -export default new TestSuite(import.meta.url, [ - ['docs', testCWDocs], +import { Suite } from '@hackbg/ensuite' +export default new Suite([ ['signer', testCWSigner] ]) @@ -12,11 +11,6 @@ const mnemonic = [ 'angry tiny foil prosper water news' ].join(' ') -export async function testCWDocs () { - //@ts-ignore - await import('./CW.spec.ts.md') -} - export async function testCWSigner () { const devnet = await new Devnet({ platform: 'okp4_5.0' }).create() const chain = devnet.getChain() diff --git a/connect/scrt/scrt.test.ts b/connect/scrt/scrt.test.ts index aa065d6442d..d4fad6b880a 100644 --- a/connect/scrt/scrt.test.ts +++ b/connect/scrt/scrt.test.ts @@ -9,8 +9,8 @@ let chain: any // for mocking let agent: Agent const mnemonic = 'define abandon palace resource estate elevator relief stock order pool knock myth brush element immense task rapid habit angry tiny foil prosper water news' -import { TestSuite } from '@hackbg/ensuite' -export default new TestSuite(import.meta.url, [ +import { Suite } from '@hackbg/ensuite' +export default new Suite([ ['devnet', testScrtDevnet], ['fees', testScrtFees], ['batches', testScrtBatches], diff --git a/connect/scrt/secretjs-esm b/connect/scrt/secretjs-esm index ea7e1478f9a..ab7f53c841d 160000 --- a/connect/scrt/secretjs-esm +++ b/connect/scrt/secretjs-esm @@ -1 +1 @@ -Subproject commit ea7e1478f9a4a4767c088bbcd24c798a879554e2 +Subproject commit ab7f53c841d40e7bdecfd0f7fbe0a723b321b6d8 diff --git a/ensuite b/ensuite index 4bd01709235..65975a0f0bd 160000 --- a/ensuite +++ b/ensuite @@ -1 +1 @@ -Subproject commit 4bd01709235993b5b1851356463ab3bebdb75b31 +Subproject commit 65975a0f0bde7bec013d89c62b78ef3c57c44748 diff --git a/fadroma-devnet.test.ts b/fadroma-devnet.test.ts index 0a74f015b4e..a7cc76ccf69 100644 --- a/fadroma-devnet.test.ts +++ b/fadroma-devnet.test.ts @@ -1,17 +1,22 @@ import Project, { - packageRoot, getDevnet, Devnet, Template, build, Uploader, Agent + getDevnet, Devnet, Template, build, Uploader, Agent } from '@hackbg/fadroma' import type { DevnetPlatform } from '@hackbg/fadroma' import * as assert from 'node:assert' import { getuid, getgid } from 'node:process' -import { resolve } from 'node:path' +import { dirname, resolve } from 'node:path' +import { fileURLToPath } from 'node:url' import $, { TextFile, JSONFile, JSONDirectory } from '@hackbg/file' import { Image, Container } from '@hackbg/dock' -import { TestSuite } from '@hackbg/ensuite' -export default new TestSuite(import.meta.url, [ +/** Root of installed Fadroma package. */ +//@ts-ignore +export const packageRoot = dirname(resolve(fileURLToPath(import.meta.url))) + +import { Suite } from '@hackbg/ensuite' +export default new Suite([ ['scrt', ()=>testDevnetPlatform('scrt_1.9')], ['okp4', ()=>testDevnetPlatform('okp4_5.0')], ['chain-id', testDevnetChainId], @@ -114,6 +119,7 @@ export async function testDevnetContainer () { ) const spawnEnv = { DAEMON: 'secretd', + TOKEN: 'uscrt', CHAIN_ID: devnet.chainId, ACCOUNTS: devnet.accounts.join(' '), STATE_UID: String(getuid!()), diff --git a/fadroma.test.ts b/fadroma.test.ts index b75ab7ac046..5289fe30820 100644 --- a/fadroma.test.ts +++ b/fadroma.test.ts @@ -14,13 +14,23 @@ import type { Agent } from '@fadroma/agent' import $, { OpaqueDirectory, withTmpDir } from '@hackbg/file' import * as Dock from '@hackbg/dock' import { fixture } from './fixtures/fixtures' -import { TestSuite } from '@hackbg/ensuite' -import { dirname, resolve } from 'node:path' -import { fileURLToPath } from 'node:url' -/** Root of installed Fadroma package. */ -//@ts-ignore -export const packageRoot = dirname(resolve(fileURLToPath(import.meta.url))) +import { Suite } from '@hackbg/ensuite' +export default new Suite([ + ['agent', () => import('./agent/agent.test')], + ['connect', () => import('./connect/connect.test')], + ['devnet', () => import('./fadroma-devnet.test')], + ['wizard', testProjectWizard], + ['collections', testCollections], + //['project', testProject], + ['deployment', testDeployment], + ['deploy-store', testDeployStore], + ['build', testBuild], + ['upload', testUpload], + ['upload-store', testUploadStore], + //['factory', () => import ('./Factory.spec.ts.md')], + //['impl', () => import('./Implementing.spec.ts.md')], +]) export async function testCollections () { @@ -271,21 +281,3 @@ export async function testProjectWizard () { 'test4' ) instanceof Project) } - -export default new TestSuite(import.meta.url, [ - ['agent', () => import('./agent/agent.test')], - ['connect', () => import('./connect/connect.test')], - ['cw', () => import('./connect/cw/cw.test')], - ['scrt', () => import('./connect/scrt/scrt.test')], - ['devnet', () => import('./fadroma-devnet.test')], - ['wizard', testProjectWizard], - ['collections', testCollections], - //['project', testProject], - ['deployment', testDeployment], - ['deploy-store', testDeployStore], - ['build', testBuild], - ['upload', testUpload], - ['upload-store', testUploadStore], - //['factory', () => import ('./Factory.spec.ts.md')], - //['impl', () => import('./Implementing.spec.ts.md')], -])