Skip to content

Commit

Permalink
Merge branch 'frankie/i#405programs' of github.com:entropyxyz/sdk int…
Browse files Browse the repository at this point in the history
…o frankie/i#405programs
  • Loading branch information
frankiebee committed Sep 24, 2024
2 parents 7aff0c5 + 4e6581a commit 457e513
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions tests/programs-dev.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,16 @@ test('Programs#dev: all methods', async (t) => {
)

const configSchema = {
noop_param: 'string',
type: 'object',
properties: {
noop_param: { type: 'string' }
}
}
const auxDataSchema = {
noop_param: 'number'
type: 'object',
properties: {
noop_param: { type: 'number' }
}
}
const newPointer = await run(
'deploy',
Expand All @@ -55,6 +61,13 @@ test('Programs#dev: all methods', async (t) => {
'get deployed programs',
entropy.programs.dev.getByDeployer(entropy.keyring.accounts.programDev.address)
)
t.deepEqual(
programsDeployed,
[newPointer],
'charlie has 1 program deployed'
)

// Helpful error for old usage
try {
await entropy.programs.dev.get(entropy.keyring.accounts.programDev.address)
t.fail('entropy.programs.dev.get(entropy.keyring.accounts.programDev.address) should have failed')
Expand All @@ -66,17 +79,6 @@ test('Programs#dev: all methods', async (t) => {
'get a specific program',
entropy.programs.dev.get(newPointer)
)
t.equal(
programsDeployed.length,
1,
'charlie has deployed 1 program' + programsDeployed
)

t.equal(
programsDeployed[0],
newPointer,
'program in list matches new pointer: ' + newPointer + ' = ' + programsDeployed[0]
)

t.deepEqual(
noopProgramOnChain.bytecode,
Expand Down

0 comments on commit 457e513

Please sign in to comment.