diff --git a/src/app.ts b/src/app.ts index 4329cb7..c609457 100644 --- a/src/app.ts +++ b/src/app.ts @@ -9,9 +9,9 @@ import { loadSource, writeSource } from './source'; import { VERSION_INFO } from './version'; import { VisitorContext } from './visitor/VisitorContext'; -const STATUS_SUCCESS = 0; -const STATUS_ERROR = 1; -const STATUS_MAX = 255; +export const STATUS_SUCCESS = 0; +export const STATUS_ERROR = 1; +export const STATUS_MAX = 255; export async function main(argv: Array): Promise { const { args, mode } = await parseArgs(argv); diff --git a/test/TestApp.ts b/test/TestApp.ts new file mode 100644 index 0000000..b34911c --- /dev/null +++ b/test/TestApp.ts @@ -0,0 +1,11 @@ +import { expect } from 'chai'; + +import { main, STATUS_SUCCESS } from '../src/app'; +import { describeLeaks } from './helpers/async'; + +describeLeaks('main app', async () => { + xit('completion should succeed', async () => { + const status = await main(['node', 'test', 'complete']); + expect(status).to.equal(STATUS_SUCCESS); + }); +});