okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
3cabb9e3f
main
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 () => { 7const env = sourceServerEnvironment ({ PATH :'x' , STRATA_API_KEY :'from-the-shell' }); 8assert . equal ( 'STRATA_API_KEY' in env , false ); 9assert . equal ( env . PATH , 'x' ); 10assert . equal ( env . PYTHONUTF8 , '1' ); 11assert . equal ( 'STRATA_API_KEY' in sourceServerEnvironment ({}), false ); 12const control = await readFile ( new URL ( '../server/native-control.mjs' , import . meta. url ), 'utf8' ); 13assert . doesNotMatch ( control , / STRATA_API_KEY:\s * '' / ); 14assert . match ( control , / env:sourceServerEnvironment\(\) / ); 15});