Skip to content

Test Executor

Terminal window
nx test my-go-app
OptionTypeDefaultDescription
coverbooleanfalseEnable coverage analysis
coverProfilestring-Write a coverage profile to the file after all tests have passed
racebooleanfalseEnable race detector
runstring-Run only tests matching this regular expression
verbosebooleanfalseEnable verbose test output
countnumber-Run test N times
timeoutstring”10m”Test timeout duration (0 to disable)
{
"executor": "@naxodev/gonx:test",
"cache": true,
"dependsOn": ["^build"],
"inputs": ["{projectRoot}/go.mod", "{projectRoot}/go.sum", "{projectRoot}/**/*.{go}"]
}
  • The test executor is cacheable, so subsequent test runs with the same test code will be faster
  • Uses the official Go test command in the background
  • Supports all common Go test options