diff --git a/test/get_local_info.spec.ts b/test/get_local_info.spec.ts new file mode 100644 index 0000000..714219e --- /dev/null +++ b/test/get_local_info.spec.ts @@ -0,0 +1,12 @@ +import {request} from "../service"; +import {CKB_LIGHT_RPC_URL} from "../config/config"; +import {expect} from "chai"; + +describe('local_node_info', function () { + it("demo",async ()=>{ + const res = await request(1,CKB_LIGHT_RPC_URL,"local_node_info",[]) + expect(res.active).to.be.equal(true) + + }) +}); + diff --git a/test/get_peers.spec.ts b/test/get_peers.spec.ts new file mode 100644 index 0000000..58355dd --- /dev/null +++ b/test/get_peers.spec.ts @@ -0,0 +1,11 @@ +import {request} from "../service"; +import {CKB_LIGHT_RPC_URL} from "../config/config"; +import {expect} from "chai"; + +describe('get_peers', function () { + + it("demo",async ()=>{ + const res = await request(1,CKB_LIGHT_RPC_URL,"get_peers",[]) + expect(res).to.be.not.equal("") + }) +}); diff --git a/test/runners/mocha/.mocharc.jsonc b/test/runners/mocha/.mocharc.jsonc index 5584382..edb7fbf 100644 --- a/test/runners/mocha/.mocharc.jsonc +++ b/test/runners/mocha/.mocharc.jsonc @@ -16,6 +16,8 @@ "test/set_scripts.spec.ts", "test/scenes.test.ts", "test/set_script_with_command.spec.ts", - "test/set_script_with_remove.spec.ts" + "test/set_script_with_remove.spec.ts", + "test/get_local_info.spec.ts", + "test/get_peers.spec.ts" ] } diff --git a/test/set_script_with_remove.spec.ts b/test/set_script_with_remove.spec.ts index 6f518d3..4cf5716 100644 --- a/test/set_script_with_remove.spec.ts +++ b/test/set_script_with_remove.spec.ts @@ -31,6 +31,7 @@ describe('set_script_with_remove', function () { scriptType: "lock" }) let afterCap; + await waitScriptsUpdate(BI.from("3000")) for (let i = 0; i < 5; i++) { afterCap = await getCellsCapacityRequest({ script: testScript,