okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221Merge f-027-gh-app: GitHub app and Terminal items for 0.2.73cabb9e3f

main
778 B15 linesraw
1import test from 'node:test';
2import assert from 'node:assert/strict';
3import { readFile } from 'node:fs/promises';
4import { sourceServerEnvironment } from '../server/control-runtime.mjs';
5
6test('the source-checkout server never gets an empty STRATA_API_KEY (#3851)', async () => {
7  const env = sourceServerEnvironment({ PATH: 'x', STRATA_API_KEY: 'from-the-shell' });
8  assert.equal('STRATA_API_KEY' in env, false);
9  assert.equal(env.PATH, 'x');
10  assert.equal(env.PYTHONUTF8, '1');
11  assert.equal('STRATA_API_KEY' in sourceServerEnvironment({}), false);
12  const control = await readFile(new URL('../server/native-control.mjs', import.meta.url), 'utf8');
13  assert.doesNotMatch(control, /STRATA_API_KEY:\s*''/);
14  assert.match(control, /env:sourceServerEnvironment\(\)/);
15});