Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
v9n committed Jan 7, 2025
1 parent b98a5dd commit ecd9810
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/sdk-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"clean": "rm -rf dist"
},
"dependencies": {
"@avaprotocol/types": "workspace:0.9.2-dev.5",
"@avaprotocol/types": "workspace:*",
"@grpc/grpc-js": "^1.11.3",
"@grpc/proto-loader": "^0.7.13",
"dotenv": "^16.4.5",
Expand Down
5 changes: 1 addition & 4 deletions packages/types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@
"outDir": "./dist",
"rootDir": "./src"
},
"include": ["src/**/*"],
"paths": {
"@avaprotocol/*": ["./packages/*"]
}
"include": ["src/**/*"]
}
13 changes: 7 additions & 6 deletions tests/triggerWorkflow.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { describe, beforeAll, test, expect } from "@jest/globals";
import Client, {
TriggerFactory,
TriggerTypes,
WorkflowStatuses,
TriggerType,
ExecutionStatus,
} from "../dist";
WorkflowStatus,
} from "@/sdk-js/dist";

import dotenv from "dotenv";
import path from "path";
import _ from "lodash";
Expand Down Expand Up @@ -310,7 +311,7 @@ describe("triggerWorkflow Tests", () => {
// The list should now contain one execution, the id from manual trigger should matched
const execution = await client.getExecution(workflowId, result.executionId);
expect(execution.id).toEqual(result.executionId);
expect(execution.triggerMetadata.type).toEqual(TriggerTypes.CRON);
expect(execution.triggerMetadata.type).toEqual(TriggerType.Cron);
expect(execution.triggerMetadata.epoch).toEqual(epoch + 60);

const executionStatus = await client.getExecutionStatus(workflowId, result.executionId);
Expand All @@ -325,7 +326,7 @@ describe("triggerWorkflow Tests", () => {
// Create a cron trigger with a schedule of every minute
const trigger = TriggerFactory.create({
name: "cronTrigger",
type: TriggerTypes.CRON,
type: TriggerType.Cron,
data: { scheduleList: ["* * * * *"] },
});

Expand All @@ -341,7 +342,7 @@ describe("triggerWorkflow Tests", () => {
const result = await client.triggerWorkflow({
id: workflowId,
data: {
type: TriggerTypes.CRON,
type: TriggerType.Cron,
epoch: epoch + 60, // set epoch to 1 minute later
},
isBlocking: false,
Expand Down

0 comments on commit ecd9810

Please sign in to comment.