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()); }); esponse-experiment'>ciro/queue-response-experiment Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/test/snippets/multiple-imports.js (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2023-07-05Fix incorrect signaturesGravatar Ashcon Partovi 3-21/+21
2023-07-05Fix detect-libcGravatar Ashcon Partovi 16-98/+116
2023-07-05Update websocket_http_client.zigGravatar Dylan Conway 1-0/+2
2023-07-05Fixes #3512 (#3526)Gravatar Jarred Sumner 9-38/+168
* Fixes #3512 * Fix `clearTimeout` and `clearInterval` not cancelling jobs same-tick --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-05Fixes #3515 (#3523)Gravatar Jarred Sumner 4-190/+182
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-05Fixes #3520 (#3522)Gravatar Jarred Sumner 3-23/+37
* Fixes #3520 * Update html_rewriter.zig --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-05add envs on tests (#3518)Gravatar Ciro Spaciari 4-0/+20
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2023-07-04Update build-idGravatar Jarred Sumner 1-1/+1
2023-07-04Fix build determinism issue (thanks to @alexlamsl)Gravatar Jarred Sumner 1-2/+2
cc @dylan-conway this was the cause
2023-07-04boopGravatar Jarred Sumner 10-55/+55
2023-07-04use sengrid account on nodemailer test (#3517)bun-v0.6.13Gravatar Ciro Spaciari 2-14/+15
2023-07-04[tls] fix servername (#3513)Gravatar Ciro Spaciari 4-8/+109
* fix servername * add postgres tls tests * update test packages * add basic CRUD test
2023-07-04Add alias for readBigUInt64BE ... (#3514)Gravatar Ai Hoshino 2-4/+58
* Add alias for `readBigUInt64BE` ... Close: https://github.com/oven-sh/bun/issues/3338 * add some tests for `readBigUint64BE` alias * format code
2023-07-04reduce countGravatar Jarred Sumner 1-2/+2
2023-07-04bumpGravatar Jarred Sumner 3-2/+2
2023-07-04Fix crashGravatar Jarred Sumner 1-5/+8