Files
bun.sh/test/cli/run/run-process-env.test.ts
Ciro Spaciari 63e2d78e76 [node:net] fix createConnection options passing (#3101)
* fixup createConnection

* fix comment

* fixup comment

* also fix it on tls
2023-05-28 13:20:32 -07:00

17 lines
523 B
TypeScript

import { describe, expect, test } from "bun:test";
import { bunRunAsScript, tempDirWithFiles } from "harness";
describe("process.env", () => {
test("npm_lifecycle_event", () => {
const scriptName = "start:dev";
const dir = tempDirWithFiles("processenv", {
"package.json": `{'scripts': {'${scriptName}': 'bun run index.ts'}}`,
"index.ts": "console.log(process.env.npm_lifecycle_event);",
});
const { stdout } = bunRunAsScript(dir, scriptName);
expect(stdout).toBe(scriptName);
});
});