function run
run(options?: InitOptions): Task<InitResult, ProjectRootNotFoundFailure>

Bootstraps a qunitx project: writes the test HTML template, updates package.json, and writes tsconfig.json when there isn't one.

Never overwrites: an existing fixture is reported in skipped and left exactly as it was.

import * as Init from './init.ts';

// Defined, not invoked: writes into a real project directory.
async function initCommand() {
  const { written } = await Init.run(); // ['/project/test/tests.html', '/project/tsconfig.json']
  return written;
}

Parameters

optional
options: InitOptions

Return Type

Usage

import { run } from "lib/commands/init.ts";