UNPKG

@naxodev/gonx

Version:

Modern Nx plugin to use Go in a Nx workspace

24 lines 1.09 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = runExecutor; const utils_1 = require("../../utils"); /** * This executor tests Go code using the `go test` command. * * @param options options passed to the executor * @param context context passed to the executor */ async function runExecutor(options, context) { return (0, utils_1.executeCommand)([ 'test', ...(0, utils_1.buildFlagIfEnabled)('-v', options.verbose), ...(0, utils_1.buildFlagIfEnabled)('-cover', options.cover), ...(0, utils_1.buildStringFlagIfValid)(`-coverprofile`, options.coverProfile), ...(0, utils_1.buildFlagIfEnabled)('-race', options.race), ...(0, utils_1.buildStringFlagIfValid)(`-run`, options.run), ...(0, utils_1.buildStringFlagIfValid)('-count', options.count > 0 ? options.count.toString() : undefined), ...(0, utils_1.buildStringFlagIfValid)(`-timeout`, options.timeout), './...', ], { cwd: (0, utils_1.extractProjectRoot)(context) }); } //# sourceMappingURL=executor.js.map