agentsclimarketplace

Test suite validation with env isolation

Skill kjuhwa/skills-hub/skills/testing/test-suite-validation-with-env-isolation

Run test suite with isolated environment (NODE_ENV=test, specific env vars, no bridge)From its SKILL.md

Install
npx -y skills add kjuhwa/skills-hub --skill test-suite-validation-with-env-isolation

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

1.5 KB, 276 tokens by cl100k_base, as published. Nobody here has run it

Env-isolated node test runner

Wrap node --test <glob> in a script that hand-builds the child's env:

  • set NODE_ENV=test, GEP_ASSETS_DIR=<tmp> and similar sandbox roots,
  • clear production-only vars (e.g. EVOLVE_BRIDGE) so a left-over shell export can't leak into the suite,
  • stream stdout/stderr back, parse the final tests <n> / fail <n> lines, exit non-zero on failure.

Why

node --test is ergonomic but inherits the shell env — which silently causes flaky pass/fails when a local dev has a bridge daemon running or custom API keys set. Isolating the env locally gives you CI-grade reliability on a laptop.

Mechanism

const env = {
  ...process.env,
  NODE_ENV: 'test',
  GEP_ASSETS_DIR: mkdtempSync('gep-'),
};
delete env.EVOLVE_BRIDGE;
const { status } = spawnSync('node', ['--test', ...globSync(glob)], { env, stdio: 'inherit' });
process.exit(status);

When to reuse

Node.js projects using node --test or vitest where env contamination is a recurring issue.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,835. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.