fix: export exit statuses
This commit is contained in:
parent
7e24bc0724
commit
e0dca3c3ad
|
@ -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<string>): Promise<number> {
|
||||
const { args, mode } = await parseArgs(argv);
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue