-
const { loadStdlib } = require("@reach-sh/stdlib")
const { assert } = require("chai")
const reach = loadStdlib("ALGO")
describe("Simple Suite", function() {
this.timeout(100000000)
async function setup() {
const startBal = reach.parseCurrency(100)
console.log(startBal)
const accs = await reach.newTestAccounts(2, startBal)
console.log(accs)
return accs
}
it("Test #1", function(done) {
setup().then((accs) => {
assert.lengthOf(accs, 2, `expected accs len 2 got ${accs.length}`)
done()
})
})
it("Test #2", async function() {
try {
const accs = await setup()
console.log(accs)
}
catch(e) { console.log(e) }
assert.lengthOf(accs, 2, `expected accs len 2 got ${accs.length}`)
})
}) Both ''Test 1" and "Test 2" appear to hang when execution comes to the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 12 replies
-
This might be related to running stdlib on node environment because a similar thing happens when the code is ran without mocha and chai |
Beta Was this translation helpful? Give feedback.
-
This was because most stdlib functions require devnet to be running in the background and as it will try to connect to the devnet it looks like halting. Starting a development network using |
Beta Was this translation helpful? Give feedback.
This was because most stdlib functions require devnet to be running in the background and as it will try to connect to the devnet it looks like halting.
Starting a development network using
./reach devnet
and then running tests works fine