I am trying to follow along the API for creating javascript tests for my contracts and I am running to an issue at the account creation example and any other commands that I try to run. The error that I see is something like this:
ERR [bb17b4] [Error Code: 1006] invalid proposal key: public key 0 on account f8d6e0586b0a20c7 does not have a valid signature: [Error Code: 1009] invalid envelope key: public key 0 on account f8d6e0586b0a20c7 does not have a valid signature: signature is not valid
So far my files are as follows:
Test I am trying to run
import path from "path";
import { init, getAccountAddress } from "flow-js-testing";
const basePath = path.resolve(__dirname, "../cadence");
describe("Accounts", () => {
// Instantiate emulator and path to Cadence files
beforeEach(async (done) => {
const port = 8080;
init(basePath, port);
done();
});
test("Create Accounts", async () => {
const Alice = await getAccountAddress("Alice");
console.log("Account were created with following addresses:\n", {
Alice,
});
expect(0).toBe(0);
});
});
flow.json
{
"emulators": {
"default": {
"port": 3569,
"serviceAccount": "emulator-account"
}
},
"contracts": {},
"networks": {
"emulator": "127.0.0.1:3569",
"mainnet": "access.mainnet.nodes.onflow.org:9000",
"testnet": "access.devnet.nodes.onflow.org:9000"
},
"accounts": {
"emulator-account": {
"address": "f8d6e0586b0a20c7",
"key": "858cb926afafe6a681c130b1b471a9b67288dd10bd81a0c976f09d478c06ef7b"
}
},
"deployments": {}
}