f
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.
I
GenerateOptions
Where to scaffold a test file. target is a project-relative path; a missing .js/.ts
extension becomes .js, and missing directories are created.
-
cwd: string
Directory to find the project root from. Defaults to
process.cwd(). -
target: string
Project-relative path of the test file to write.
I
GenerateResult
What generate did: the file it wrote, or the one it refused to overwrite.
-
created: boolean
falsewhen the file already existed and nothing was written. -
path: string
Absolute path of the target file.
Usage
import * as mod from "lib/commands/generate.ts";