Skip to content

Function: xmTestTarget()

API / @xmachines/shared / vite-aliases / xmTestTarget

function xmTestTarget(env?): XmTestTarget;

Defined in: vite-aliases.ts:25

Reads the test target from the XM_TEST_TARGET environment variable.

The variable is the one switch of the dist run. The config helpers of this package read it, so no package config holds a second copy of the dist setup. An unset or empty variable gives source. Any other value than source or dist is an error: a typo must not run the suite against the source and report the result as a run against the build.

Parameters

ParameterTypeDefault valueDescription
envProcessEnvprocess.envThe environment to read. The default is process.env.

Returns

XmTestTarget