47 lines
1.4 KiB
TypeScript
47 lines
1.4 KiB
TypeScript
![]() |
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";
|
||
|
import { ExecutorProgramServiceTest } from "./executor_program_service_test.js";
|
||
|
import { FilesChangerTest } from "./files_change_notifier_service_test.js";
|
||
|
import { TestCore } from "./core/test_core.js";
|
||
|
import "reflect-metadata";
|
||
|
import { CalculationProcess, IssueType, ProcessMetaData, ProcessType, TriggerType } from "../src/core/model/process_model.js";
|
||
|
|
||
|
const testCore = TestCore.instance;
|
||
|
const __filename: string = fileURLToPath(import.meta.url);
|
||
|
|
||
|
export const __dirname: string = dirname(__filename);
|
||
|
export const assert = testCore.assert;
|
||
|
export const resultTest = testCore.resultTest;
|
||
|
const env = new UnitTestEnv(__dirname);
|
||
|
|
||
|
locator(env);
|
||
|
|
||
|
const main = async () => {
|
||
|
await new ExecutorProgramServiceTest(__dirname).test();
|
||
|
await new FilesChangerTest(__dirname).test()
|
||
|
await testCore.testResult();
|
||
|
};
|
||
|
|
||
|
main();
|
||
|
// const logProcess:ProcessMetaData = {
|
||
|
// process: {
|
||
|
// type: ProcessType.EXEC,
|
||
|
// command: `nix-shell -p 'python39.withPackages(ps: with ps; [ ])' --run 'python3 p.py 1'`,
|
||
|
// isGenerating: false,
|
||
|
// isLocaleCode: false,
|
||
|
// issueType: IssueType.WARNING,
|
||
|
// timeout: 10000000,
|
||
|
// },
|
||
|
|
||
|
// trigger: {
|
||
|
// type: TriggerType.PROCESS,
|
||
|
// value: 'code',
|
||
|
// },
|
||
|
// env: null,
|
||
|
|
||
|
// }
|
||
|
// const calculationProcess = new CalculationProcess([])
|
||
|
|
||
|
|