2023-08-31 16:56:17 +03:00
|
|
|
import locator from "../src/core/di/register_di.js";
|
|
|
|
import { UnitTestEnv } from "../src/core/di/env.js";
|
|
|
|
import { fileURLToPath } from "url";
|
|
|
|
import { dirname } from "path";
|
2023-09-11 19:49:45 +03:00
|
|
|
import { ExecutorProgramServiceTest } from "./features/executor_program_service_test.js";
|
|
|
|
import { FilesChangerTest } from "./features/files_change_notifier_service_test.js";
|
2023-08-31 16:56:17 +03:00
|
|
|
import { TestCore } from "./core/test_core.js";
|
|
|
|
import "reflect-metadata";
|
2023-09-11 19:49:45 +03:00
|
|
|
import { StackServiceTest } from "./features/stack_service_test.js";
|
|
|
|
import { TriggerServiceTest } from "./features/trigger_service_test.js";
|
2023-08-31 16:56:17 +03:00
|
|
|
|
|
|
|
const testCore = TestCore.instance;
|
|
|
|
const __filename: string = fileURLToPath(import.meta.url);
|
|
|
|
|
2023-09-11 19:49:45 +03:00
|
|
|
export const dirname__: string = dirname(__filename);
|
2023-08-31 16:56:17 +03:00
|
|
|
export const assert = testCore.assert;
|
|
|
|
export const resultTest = testCore.resultTest;
|
2023-09-11 19:49:45 +03:00
|
|
|
const env = new UnitTestEnv(dirname__);
|
2023-08-31 16:56:17 +03:00
|
|
|
|
|
|
|
locator(env);
|
|
|
|
|
|
|
|
const main = async () => {
|
2023-09-11 19:49:45 +03:00
|
|
|
await new ExecutorProgramServiceTest(dirname__).test();
|
|
|
|
await new FilesChangerTest(dirname__).test();
|
|
|
|
await new StackServiceTest(dirname__ + "/context/").test();
|
|
|
|
await new TriggerServiceTest().test();
|
2023-08-31 16:56:17 +03:00
|
|
|
await testCore.testResult();
|
|
|
|
};
|
|
|
|
|
2023-09-11 19:49:45 +03:00
|
|
|
main();
|