Skip to content

Commit

Permalink
fix: e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mgordel committed Feb 14, 2024
1 parent ed09b95 commit acf1917
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/e2e/strategies.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("Strategies", function () {
const taskCompletedIds: string[] = [];
executor.events.on("taskCompleted", (details) => taskCompletedIds.push(details.id));
executor.events.on("golemEvents", (event) => {
if (event.name === Events.ProposalReceived.name) {
if (event.name === Events.ProposalResponded.name) {
proposalReceivedProviderNames.push((event as Events.ProposalResponded).detail.provider.name);
}
});
Expand Down Expand Up @@ -41,7 +41,7 @@ describe("Strategies", function () {
const taskCompletedIds: string[] = [];
executor.events.on("taskCompleted", (details) => taskCompletedIds.push(details.id));
executor.events.on("golemEvents", (event) => {
if (event.name === Events.ProposalReceived.name) {
if (event.name === Events.ProposalResponded.name) {
proposalReceivedProviderNames.push((event as Events.ProposalResponded).detail.provider.name);
}
});
Expand Down
3 changes: 1 addition & 2 deletions tests/e2e/tasks.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ describe("Task Executor", function () {

const verifyAllExpectedEventsEmitted = () => {
expect(emittedEventsNames).toContain(Events.ProposalReceived.name);
expect(emittedEventsNames).toContain(Events.ProposalConfirmed.name);
expect(emittedEventsNames).toContain(Events.ProposalResponded.name);
expect(emittedEventsNames).toContain(Events.AgreementCreated.name);
expect(emittedEventsNames).toContain(Events.ActivityCreated.name);
Expand Down Expand Up @@ -101,7 +100,7 @@ describe("Task Executor", function () {
expect(e).toBeUndefined();
});
await sleep(5);
expect(taskDetails).toEqual({ taskId: "1", providerName: expect.anything(), retries: expect.anything() });
expect(taskDetails.taskId).toEqual("1");
expect(outputs[0]).toEqual("Hello Golem");
expect(outputs[1]).toEqual("Hello World");
expect(outputs[2]).toEqual("OK");
Expand Down

0 comments on commit acf1917

Please sign in to comment.