From 4a822bda8ccb82ce8dc814104dc73bb77927a5f2 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 15 Sep 2024 23:23:02 +0200 Subject: [PATCH] try hack teardown --- e2e-examples/cli-e2e-original/setup/global-setup.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/e2e-examples/cli-e2e-original/setup/global-setup.ts b/e2e-examples/cli-e2e-original/setup/global-setup.ts index 9374c92d..34d10fcb 100644 --- a/e2e-examples/cli-e2e-original/setup/global-setup.ts +++ b/e2e-examples/cli-e2e-original/setup/global-setup.ts @@ -9,6 +9,7 @@ import { const isVerbose = process.env['NX_VERBOSE_LOGGING'] === 'true' ?? false; const projectName = process.env['NX_TASK_TARGET_PROJECT']; +let stopFn: () => void export async function setup() { if (projectName == null) { @@ -44,15 +45,22 @@ export async function setup() { targets: 'original-npm-install', exclude: 'tag:type:testing', skipNxCache: true, + parallel: 1, verbose: isVerbose }), verbose: isVerbose }); // @TODO figure out why named exports don't work https://vitest.dev/config/#globalsetup - return () => teardownSetup(registryResult); + stopFn = () => teardownSetup(registryResult) + return () => stopFn(); } + + +export async function teardown() { + stopFn() +} export async function teardownSetup({ registry, stop }: RegistryResult) { console.info(`Teardown ${projectName}`); // uninstall all projects