UNPKG

turbo-gulp

Version:

Gulp tasks to boost high-quality projects.

70 lines (69 loc) 2.23 kB
/// <reference types="gulp" /> /** * This module defines the _mocha_ target type used to build and run Mocha tests. * * In the following list of tasks, `{target}` represents the name of the target as defined by the `name` property * of the target options. * The _lib_ target provides the following tasks: * * ## {target} * * Build and run the tests, use the console reporter. * * ## {target}:build * * Performs a full test build of the library and test files. * * ## {target}:run * * Only run the tests (does not build the tests). * * ## {target}:coverage * * Run tests with coverage (does not build the tests). * * ## {target}:typedoc:deploy * * Deploy the _Typedoc_ documentation using _git_. This can be used to easily deploy the documentation to the * `gh-pages` branch. * * ## {target}:clean * * Remove the build and directory corresponding to this target. * * ## {target}:tsconfig.json * * Emit a `tsconfig.json` file corresponding to the configuration for this target. This allows to compile it using * the command line `tsc` program. This is also useful for IDE to auto-detect the configuration of the project. * * @module targets/mocha */ /** (Placeholder comment, see christopherthielen/typedoc-plugin-external-module-name#6) */ import { Gulp, TaskFunction } from "gulp"; import { BaseTasks, TargetBase } from "./_base"; /** * Represents a test build using Mocha, it runs with Node. */ export interface MochaTarget extends TargetBase { } export interface MochaTasks extends BaseTasks { start: TaskFunction; run: TaskFunction; runCjs?: TaskFunction; runEsm?: TaskFunction; coverage: TaskFunction; } /** * Generates gulp tasks for the provided Mocha target. * * @param gulp Gulp instance used to generate tasks manipulating files. * @param targetOptions Target configuration. */ export declare function generateMochaTasks(gulp: Gulp, targetOptions: MochaTarget): MochaTasks; /** * Generates and registers gulp tasks for the provided Mocha target. * * @param gulp Gulp instance where the tasks will be registered. * @param targetOptions Target configuration. */ export declare function registerMochaTasks(gulp: Gulp, targetOptions: MochaTarget): MochaTasks;