mirror of
https://github.com/fluencelabs/aqua.git
synced 2024-12-04 22:50:18 +00:00
chore(tests): Remove usage of onConnectionStateChange
[LNG-291] (#1046)
Remove usage of onConnectionStateChange
This commit is contained in:
parent
098fac79ba
commit
34e274d45e
@ -40,9 +40,7 @@ import {
|
|||||||
multipleAbilityWithClosureCall,
|
multipleAbilityWithClosureCall,
|
||||||
returnSrvAsAbilityCall,
|
returnSrvAsAbilityCall,
|
||||||
} from "../examples/abilityCall.js";
|
} from "../examples/abilityCall.js";
|
||||||
import {
|
import { bugLNG314Call } from "../examples/abilityClosureCall.js";
|
||||||
bugLNG314Call,
|
|
||||||
} from "../examples/abilityClosureCall.js";
|
|
||||||
import {
|
import {
|
||||||
nilLengthCall,
|
nilLengthCall,
|
||||||
nilLiteralCall,
|
nilLiteralCall,
|
||||||
@ -123,7 +121,7 @@ import { lng193BugCall } from "../examples/closureReturnRename.js";
|
|||||||
import {
|
import {
|
||||||
closuresCall,
|
closuresCall,
|
||||||
multipleClosuresLNG262BugCall,
|
multipleClosuresLNG262BugCall,
|
||||||
lng317BugCall
|
lng317BugCall,
|
||||||
} from "../examples/closures.js";
|
} from "../examples/closures.js";
|
||||||
import { closureArrowCaptureCall } from "../examples/closureArrowCapture.js";
|
import { closureArrowCaptureCall } from "../examples/closureArrowCapture.js";
|
||||||
import {
|
import {
|
||||||
@ -185,22 +183,12 @@ import log from "loglevel";
|
|||||||
// log.setDefaultLevel("debug")
|
// log.setDefaultLevel("debug")
|
||||||
|
|
||||||
async function start() {
|
async function start() {
|
||||||
console.log("CONNECTING TO FIRST:");
|
|
||||||
Fluence.onConnectionStateChange((s) => {
|
|
||||||
console.log(s);
|
|
||||||
});
|
|
||||||
await Fluence.connect(relay1, {});
|
await Fluence.connect(relay1, {});
|
||||||
const cl = await Fluence.getClient();
|
|
||||||
peer1 = cl;
|
|
||||||
selfPeerId = cl.getPeerId();
|
|
||||||
console.log("CONNECTED");
|
|
||||||
|
|
||||||
peer2 = await createClient(relay2, {});
|
peer1 = Fluence.getClient();
|
||||||
console.log("CONNECTING TO SECOND:");
|
selfPeerId = peer1.getPeerId();
|
||||||
peer2.onConnectionStateChange((s) => {
|
|
||||||
console.log(s);
|
peer2 = await createClient(relay2);
|
||||||
});
|
|
||||||
console.log("CONNECTED");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function stop() {
|
async function stop() {
|
||||||
@ -671,9 +659,9 @@ describe("Testing examples", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("abilitiesClosure.aqua bug LNG-314", async () => {
|
it("abilitiesClosure.aqua bug LNG-314", async () => {
|
||||||
let result = await bugLNG314Call();
|
let result = await bugLNG314Call();
|
||||||
expect(result).toEqual("strstrstr");
|
expect(result).toEqual("strstrstr");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("functors.aqua LNG-119 bug", async () => {
|
it("functors.aqua LNG-119 bug", async () => {
|
||||||
let result = await bugLng119Call();
|
let result = await bugLng119Call();
|
||||||
@ -1114,8 +1102,8 @@ describe("Testing examples", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("closures.aqua bug LNG-317", async () => {
|
it("closures.aqua bug LNG-317", async () => {
|
||||||
let result = await lng317BugCall();
|
let result = await lng317BugCall();
|
||||||
expect(result).toEqual(["empty", "identity"]);
|
expect(result).toEqual(["empty", "identity"]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("closureArrowCapture.aqua", async () => {
|
it("closureArrowCapture.aqua", async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user