import { describe, it } from "bun:test"; it("process", () => { // this property isn't implemented yet but it should at least return a string const isNode = !process.isBun; if (!isNode && process.title !== "bun") throw new Error("process.title is not 'bun'"); if (typeof process.env.USER !== "string") throw new Error("process.env is not an object"); if (process.env.USER.length === 0) throw new Error("process.env is missing a USER property"); if (process.platform !== "darwin" && process.platform !== "linux") throw new Error("process.platform is invalid"); if (isNode) throw new Error("process.isBun is invalid"); // partially to test it doesn't crash due to various strange types process.env.BACON = "yummy"; if (process.env.BACON !== "yummy") { throw new Error("process.env is not writable"); } delete process.env.BACON; if (typeof process.env.BACON !== "undefined") { throw new Error("process.env is not deletable"); } process.env.BACON = "yummy"; if (process.env.BACON !== "yummy") { throw new Error("process.env is not re-writable"); } if (JSON.parse(JSON.stringify(process.env)).BACON !== "yummy") { throw new Error("process.env is not serializable"); } if (typeof JSON.parse(JSON.stringify(process.env)).toJSON !== "undefined") { throw new Error( "process.env should call toJSON to hide its internal state" ); } var { env, ...proces } = process; console.log(JSON.stringify(proces, null, 2)); console.log(proces); console.log("CWD", process.cwd()); console.log("SET CWD", process.chdir("../")); console.log("CWD", process.cwd()); }); value='ciro/queue-response-experiment' selected='selected'>ciro/queue-response-experiment Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/src/cache.zig (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2022-07-21Separate Dockerfile for devcontainerGravatar Jarred Sumner 2-1/+100
2022-07-21BumpGravatar Jarred Sumner 1-1/+1
2022-07-21Redo the dockerfileGravatar Jarred SUmner 5-222/+203
2022-07-21docs(templates): Update README.md (#783)Gravatar Sakib Hasan 1-0/+8
2022-07-20chore(vscode): set tab size and tab format (#810)Gravatar Carter Snook 1-1/+2
2022-07-20feat(node/fs): implement more stat methods (#807)Gravatar Carter Snook 3-5/+108
2022-07-19Allow blankGravatar Jarred Sumner 1-1/+1
2022-07-19fix(api): stop double-free of prop array (#793)Gravatar Carter Snook 2-8/+6
2022-07-19refactor(installer): renovate install script (#745)Gravatar Wallunen 1-122/+162