2022-11-08 14:10:42 +00:00
|
|
|
import "mocha";
|
2023-05-24 09:52:32 +00:00
|
|
|
import { Executor, FileStorage, RunHistory } from "@certd/pipeline";
|
2022-11-08 14:10:42 +00:00
|
|
|
import { pipeline } from "./pipeline.define";
|
|
|
|
import { AccessServiceTest } from "./access-service-test";
|
2023-05-09 01:49:42 +00:00
|
|
|
import "../../src";
|
2023-05-09 02:16:49 +00:00
|
|
|
import "../plugin/echo-plugin";
|
2023-05-24 09:52:32 +00:00
|
|
|
|
2022-11-08 14:10:42 +00:00
|
|
|
describe("pipeline", function () {
|
|
|
|
it("#pipeline", async function () {
|
2023-05-24 16:41:36 +00:00
|
|
|
//@ts-ignore
|
2022-11-08 14:10:42 +00:00
|
|
|
this.timeout(120000);
|
2023-05-24 09:52:32 +00:00
|
|
|
async function onChanged(history: RunHistory) {
|
2022-11-08 14:10:42 +00:00
|
|
|
console.log("changed:");
|
|
|
|
}
|
|
|
|
|
|
|
|
const executor = new Executor({ userId: "test", pipeline, onChanged, accessService: new AccessServiceTest(), storage: new FileStorage() });
|
|
|
|
await executor.run(1, "user");
|
|
|
|
// expect(define.name).eq("EchoPlugin");
|
|
|
|
});
|
|
|
|
});
|