function run
run(options?: GenerateOptions): Task<GenerateResult, ProjectRootNotFoundFailure>

Writes a new test file from the boilerplate template, deriving the QUnit module name from the path. Never overwrites an existing file.

import * as Generate from './generate.ts';

// Defined, not invoked: writes into a real project directory.
async function generateCommand() {
  const { path, created } = await Generate.run({ target: 'test/login-test.ts' });
  return created ? path : `${path} already exists`;
}

Parameters

optional
options: GenerateOptions

Return Type

Task<GenerateResult, ProjectRootNotFoundFailure>

Usage

import { run } from "lib/api/index.ts";