Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('runs api-documenter', async () => {
const args = [
'markdown',
'-i',
path.join(APIDOCS_ROOT, 'models'),
'-o',
SITE_APIDOCS_ROOT,
];
process.chdir(path.join(__dirname, '../../..'));
const child = runCLI('@microsoft/api-documenter/lib/start', args, {
stdio: 'ignore',
});
await pEvent(child, 'close');
const files = await fs.readdir(SITE_APIDOCS_ROOT);
expect(files.sort()).eql(API_MD_FILES);
});