repo-root.test.mjs
sha256:8915fe406161f95c1681f9469375e7bae5b28c884f00bedbdef65e4b0cd0738d
docs(flow): commit FLOW-V0-SPEC.md hygiene for 7A-INT merge
Human
13 hours ago
| 1 | import { describe, it } from 'node:test'; |
| 2 | import assert from 'node:assert'; |
| 3 | |
| 4 | describe('getRepoRoot', () => { |
| 5 | it('returns process.cwd when NETLIFY is set (bundled functions avoid import.meta.url)', async () => { |
| 6 | const prevN = process.env.NETLIFY; |
| 7 | const prevA = process.env.AWS_LAMBDA_FUNCTION_NAME; |
| 8 | try { |
| 9 | delete process.env.AWS_LAMBDA_FUNCTION_NAME; |
| 10 | process.env.NETLIFY = 'true'; |
| 11 | const { getRepoRoot } = await import('../lib/repo-root.mjs'); |
| 12 | assert.strictEqual(getRepoRoot(), process.cwd()); |
| 13 | } finally { |
| 14 | if (prevN === undefined) delete process.env.NETLIFY; |
| 15 | else process.env.NETLIFY = prevN; |
| 16 | if (prevA === undefined) delete process.env.AWS_LAMBDA_FUNCTION_NAME; |
| 17 | else process.env.AWS_LAMBDA_FUNCTION_NAME = prevA; |
| 18 | } |
| 19 | }); |
| 20 | }); |
File History
1 commit
sha256:8915fe406161f95c1681f9469375e7bae5b28c884f00bedbdef65e4b0cd0738d
docs(flow): commit FLOW-V0-SPEC.md hygiene for 7A-INT merge
Human
13 hours ago