Hi team. I’m trying to switch to try-o-rama but having some teething issues.
I get the following error:
Created DNA package file at "/home/simwilso/Code/RedGrid-Alpha/Holochain/signal_agent/dist/signal_agent.dna.json"
DNA hash: QmZkSgUvhcNiQ6hG1vMHngp7G4asF8CiB2t4gqdg5xjxNv
Running tests in test/index.js
> node test/index.js
23:20:39 [try-o-rama] debug: About to execute 1 tests
got an error for messages are fetchable tapeExecutor middleware requires scenario functions to take 2 arguments, please check your scenario definitions.
23:20:39 [try-o-rama] debug: Done with test: messages are fetchable
Here’s my js:
const path = require('path')
const tape = require('tape')
const { Orchestrator, Config, tapeExecutor, singleConductor, combine } = require('@holochain/try-o-rama')
process.on('unhandledRejection', error => {
// Will print "unhandledRejection err is not defined"
console.error('got unhandledRejection:', error);
});
const dnaPath = path.join(__dirname, "../dist/signal_agent.dna.json")
const orchestrator = new Orchestrator({
middleware: combine(
// squash all instances from all conductors down into a single conductor,
// for in-memory testing purposes.
// Remove this middleware for other "real" network types which can actually
// send messages across conductors
singleConductor,
// use the tape harness to run the tests, injects the tape API into each scenario
// as the second argument
tapeExecutor(require('tape'))
),
globalConfig: {
logger: true,
network: 'memory', // must use singleConductor middleware if using in-memory network
},
// the following are optional:
waiter: {
softTimeout: 5000,
hardTimeout: 10000,
},
})
const conductorConfig = {
instances: {
signal_agent: Config.dna(dnaPath, 'scaffold-test')
}
}
orchestrator.registerScenario('messages are fetchable', async s => {
const { alice, bob } = await s.players({ alice: conductorConfig, bob: conductorConfig }, true)
await alice.call('signal_agent', 'spot_signal', 'set_price', {
price: 'you beauty it works',
})
await s.consistency() // wait long enough for network propagation to reach bob
const result = await bob.call('signal_agent', 'spot_signal', 'get_price', {})
assert(result.Ok[0] === 'you beauty it works')
})
orchestrator.run()
Any tips on what I’ve mucked up here?