Skip to content

Commit

Permalink
fix signal handler test
Browse files Browse the repository at this point in the history
  • Loading branch information
jdeepee committed Feb 1, 2023
1 parent 4a48e99 commit 65e4185
Showing 1 changed file with 39 additions and 32 deletions.
71 changes: 39 additions & 32 deletions hc-dna/zomes/tests/signals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,41 +9,48 @@ export async function signals(t) {
let aliceSignalCount = 0;
let bobSignalCount = 0;

const aliceHapps = await scenario.addPlayerWithApp({
bundle: {
manifest: {
manifest_version: "1",
name: "perspective-diff-sync",
roles: [{
name: "main",
dna: {
//@ts-ignore
path: resolve(dnas[0].source.path)
}
}]
const aliceHapps = await scenario.addPlayerWithApp(
{
bundle: {
manifest: {
manifest_version: "1",
name: "perspective-diff-sync",
roles: [{
name: "main",
dna: {
//@ts-ignore
path: resolve(dnas[0].source.path)
}
}]
},
resources: {}
},
resources: {}
},
signalHandler: (signal) => {
console.log("Alice Received Signal:",signal)
aliceSignalCount += 1;
},
{
signalHandler: (signal) => {
console.log("Alice Received Signal:",signal)
aliceSignalCount += 1;
}
}
});
const bobHapps = await scenario.addPlayerWithApp({
bundle: {
manifest: {
manifest_version: "1",
name: "perspective-diff-sync",
roles: [{
name: "main",
dna: {
//@ts-ignore
path: resolve(dnas[0].source.path)
}
}]
},
resources: {}
);
const bobHapps = await scenario.addPlayerWithApp(
{
bundle: {
manifest: {
manifest_version: "1",
name: "perspective-diff-sync",
roles: [{
name: "main",
dna: {
//@ts-ignore
path: resolve(dnas[0].source.path)
}
}]
},
resources: {}
}
},
{
signalHandler: (signal) => {
console.log("Bob Received Signal:",signal)
bobSignalCount += 1;
Expand Down

0 comments on commit 65e4185

Please sign in to comment.