Skip to content

Commit

Permalink
Updating automation test script.
Browse files Browse the repository at this point in the history
  • Loading branch information
mike12345567 committed Apr 12, 2023
1 parent c42e7e7 commit 191b23e
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions automation/test/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
import { describe, it, beforeAll, expect } from "@jest/globals"
import automation from "../src"
import { describe, it, expect } from "@jest/globals"
import { EventEmitter } from "events"

describe("test the automation action", () => {
it("should be able to run automation step", async () => {
const response = await automation.action({
inputs: {
text: "hello",
},
emitter: new EventEmitter(),
context: {},
appId: "test",
})
expect(response.success).toBe(true)
})
})

describe("test the automation schema", () => {
it("should provide the schema", () => {
expect(automation.schema.type).toBe("automation")
expect(automation.schema.schema.stepId).toBeDefined()
})
})

})

0 comments on commit 191b23e

Please sign in to comment.