/[sudobot]/trunk/tests/mocks/application.mock.ts
ViewVC logotype

Contents of /trunk/tests/mocks/application.mock.ts

Parent Directory Parent Directory | Revision Log Revision Log


Revision 575 - (show annotations)
Mon Jul 29 17:59:26 2024 UTC (8 months ago) by rakinar2
File MIME type: application/typescript
File size: 674 byte(s)
chore: add trunk
1 import Application from "@framework/app/Application";
2 import { Logger } from "@framework/log/Logger";
3 import path from "path";
4 import { version } from '../../package.json';
5 import { createClient } from "./client.mock";
6
7 export const createApplication = () => {
8 const client = createClient();
9 const application = new Application(path.resolve(__dirname), path.resolve(__dirname, "../../.."), version);
10
11 application.setClient(client);
12 application.setLogger(new Logger("test_system", true));
13 application.container.bind(Application, {
14 key: "application",
15 singleton: true,
16 factory: () => application
17 });
18
19 return application;
20 };

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26