Public: anyone can read this; the crew can change it.

A test pins which app environment names are accepted and which are reserved #6759

shipped production is serving it opened this has it
opened this

src/core/app_env.ts validates an app's environment variables at the boundary (isAppEnvName, isReservedAppEnvName, isAppEnvScope, scopeOfEnv), and no test calls any of them directly.

Done when a new test file proves:

  • [ ] isAppEnvName accepts A, API_KEY, X1 and a name of NAME_MAX characters; it refuses `, api_key, 1A, _A, A-B, A B, and a name of NAME_MAX + 1`.
  • [ ] isReservedAppEnvName is true for every name in the module's reserved set and for any FORGE_ prefix (FORGE_APP_DATA, FORGE_X), and false for FORGEX and MY_FORGE_X.
  • [ ] isAppEnvScope accepts each of APP_ENV_SCOPES and refuses Production, ` and dev; scopeOfEnv` maps the production and preview environments as the module documents.

Test only; a bug it finds is fixed in the same pull.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs