aboutsummaryrefslogtreecommitdiff
path: root/test/cli (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-08-03[install] fix stale `bun.lockb` on workspaces (#3945)Gravatar Alex Lam S.L 1-0/+33
- handle workspaces under `--production` correctly - fix `Makefile`
2023-08-02Rewrite built-in modules to use CommonJS over ESM (#3814)Gravatar dave caruso 1-23/+0
* stfdsafsd sadffdsa stuff finish commonjs stuff asdf not done but work not done but work not done yet but this is how far i am remove files lol update built files uncomment everything in events lol export default stuff * afdsafsd * its not perfect but almost done * okay * cool * remove temp file * finish rebase * revert settings.json * a * ch-ch-ch-ch-changes * okay * remove this check in release for now * sxdcfghnjm, * lkjhgf * fmt * filename can be null * Update NodeModuleModule.h * weee * fmt --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-08-01Fix expanding on .env files (#3918)Gravatar Ciro Spaciari 1-1/+67
* fix expanding * refactor locks * bound checks * fix comment * one more test * oops
2023-07-30Support `bun .` to run the entry point (#3891)Gravatar Jarred Sumner 1-4/+68
* Support `bun .` * Fix tests --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-27Fix hot reloading in canary (#3848)Gravatar Jarred Sumner 2-5/+9
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-26[install] handle `workspace:[alias@]range` (#3819)Gravatar Alex Lam S.L 1-0/+120
2023-07-24[install] fix workspace override of aliased npm dependency (#3784)Gravatar Alex Lam S.L 1-0/+106
2023-07-23more tests for #3754 (#3774)Gravatar Alex Lam S.L 1-0/+110
2023-07-22[install] improve workspace substitution of npm dependencies (#3754)Gravatar Alex Lam S.L 1-30/+241
- respect semver ranges
2023-07-21fix #3716 (#3733)Gravatar Dylan Conway 1-0/+8
* don't break on comments for process env variables * break for `\r` and `\n` * don't parse process env vars
2023-07-19Fixes #3670 (#3698)Gravatar Jarred Sumner 1-0/+12
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-17[install] handle duplicated workspace declarations gracefully (#3662)Gravatar Alex Lam S.L 1-0/+172
fixes #3644
2023-07-17Fix test with incorrect textGravatar Jarred Sumner 1-3/+3
2023-07-14structured clone (#3637)Gravatar Dylan Conway 1-3/+2
* copy `SerializedScriptValue` * format * make `SerializedScriptValue` compile * add `transfer` option * tests * serialize/deserialize blobs * tests for blobs * serialize/deserialize file blobs * more tests * small cleanup * format * small changes + serialize offset * slice helper * map and set test
2023-07-13Impl. fix (#3630)Gravatar Tiramify (A.K. Daniel) 1-2/+17
2023-07-12feat(bun/test): Implement "bail" option for "bun test" (#3253)Gravatar Tiramify (A.K. Daniel) 1-0/+62
* Implement bun test --bail * Fixes * move printSummary() (more readable) * Fixes 2 * idk why it got deleted * Fixes 3 * fmt this better * Update test_command.zig * Fix "0 files" * track number of files so bailing out early prints the right number --------- Co-authored-by: dave caruso <me@paperdave.net>
2023-07-04[install] fix run-time module loading (#3510)Gravatar Alex Lam S.L 1-16/+92
- fix version buffer confusion - improve workaround to handle cached modules fixes #3507
2023-07-02fix zero length env var (#3496)Gravatar dave caruso 1-0/+10
2023-06-30[install] handle `workspace:` specifier correctly (#3474)Gravatar Alex Lam S.L 2-8/+52
fixes #3430
2023-06-28[install] workaround run-time module loading issue (#3432)Gravatar Alex Lam S.L 2-79/+97
2023-06-26[bun install] Implement `--exact` flag (#3409)Gravatar Jarred Sumner 1-0/+55
* [bun install] Implement `--exact` flag * Rename to --save-exact * Rename --exact to --save-exact * Update bun-add.test.ts * We're going with --exact as the flag name --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-06-26[install] support trustedDependencies (#3288)Gravatar Alex Lam S.L 1-1/+73
* [install] support trustedDependencies closes #2073 * use `strings.indexOfChar()` * use hashes instead of strings * utilise `inline else`
2023-06-25Add support for install with --frozen-lockfile (#3365)Gravatar Tiago Teixeira 1-0/+49
* Add support for install with --frozen-lockfile * Add test * Add test for frozenLockfile in config file
2023-06-26[install] fix hang in `bun install --production` (#3406)Gravatar Alex Lam S.L 1-10/+39
2023-06-25Add `process.mainModule`Gravatar Jarred Sumner 1-0/+5
2023-06-24Rewrite Bun's runtime CommonJS loader (#3379)Gravatar Jarred Sumner 2-0/+10
* wip changes for CommonJS * this rewrite is almost complete * even more code * wip * Remove usages of `import.meta.require` from builtins * Remove usages of require * Regenerate * :scissors: builtin rewrite commonjs in printer * Use lazy custom getters for import.meta * fixups * Remove depd * ugh * still crashing * fixup undici * comment out import.meta.require.resolve temporarily not a real solution but it stops the crashes * Redo import.meta.primordials * Builtins now have a `builtin://` protocol in source origin * Seems to work? * Finsih getting rid of primordials * switcharoo * No more function * just one more bug * Update launch.json * Implement `require.main` * :scissors: * Bump WebKit * Fixup import cycles * Fixup improt cycles * export more things * Implement `createCommonJSModule` builtin * More exports * regenerate * i broke some stuff * some of these tests work now * We lost the encoding * Sort of fix zlib * Sort of fix util * Update events.js * bump * bump * bump * Fix missing export in fs * fix some bugs with builtin esm modules (stream, worker_threads, events). its not perfect yet. * fix some other internal module bugs * oops * fix some extra require default stuff * uncomment this file but it crsahes on my machine * tidy code here * fixup tls exports * make simdutf happier * Add hasPrefix binding * Add test for `require.main` * Fix CommonJS evaluation order race condition * Make node:http load faster * Add missing exports to tls.js * Use the getter * Regenerate builtins * Fix assertion failure in Bun.write() * revamp dotEnv parser (#3347) - fixes `strings.indexOfAny()` - fixes OOB array access fixes #411 fixes #2823 fixes #3042 * fix tests for `expect()` (#3384) - extend test job time-out for `darwin-aarch64` * `expect().resolves` and `expect().rejects` (#3318) * Move expect and snapshots to their own files * expect().resolves and expect().rejects * Fix promise being added to unhandled rejection list * Handle timeouts in expect(<promise>) * wip merge * Fix merge issue --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> * fixup min/memcopy (#3388) * Fix crash in builtins * Don't attempt to evaluate modules with no source code * Update WebCoreJSBuiltins.cpp * Update WebCoreJSBuiltins.cpp * Update WebCoreJSBuiltins.cpp * Fix crash * cleanup * Fix test cc @paperdave * Fixup Undici * Fix issue in node:http * Create util-deprecate.mjs * Fix several bugs * Use the identifier * Support error.code in `util.deprecate` * make the CJs loader slightly more resilient * Update WebCoreJSBuiltins.cpp * Fix macros --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: dave caruso <me@paperdave.net> Co-authored-by: Alex Lam S.L <alexlamsl@gmail.com> Co-authored-by: Ashcon Partovi <ashcon@partovi.net> Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com>
2023-06-22`expect().resolves` and `expect().rejects` (#3318)Gravatar Ashcon Partovi 1-1/+21
* Move expect and snapshots to their own files * expect().resolves and expect().rejects * Fix promise being added to unhandled rejection list * Handle timeouts in expect(<promise>) * wip merge * Fix merge issue --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-06-22revamp dotEnv parser (#3347)Gravatar Alex Lam S.L 2-12/+86
- fixes `strings.indexOfAny()` - fixes OOB array access fixes #411 fixes #2823 fixes #3042
2023-06-20Fix crash with .env files that are exactly 159 bytes long (#3369)Gravatar Jarred Sumner 1-0/+23
* Fix crash with .env files that are exactly 158 bytes and a newline character * Update env_loader.zig --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-06-19Fix bug that breaks `bunx prisma init` when node is not installed (#3362)Gravatar Jarred Sumner 2-0/+21
* tweak cjs * Handle more cases, add a test --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-06-13workaround quote escape issues for `bun run` (#3290)Gravatar Alex Lam S.L 1-0/+15
fixes #53
2023-06-11add --save argument to install (#3277)Gravatar Keyhan Vakil 1-0/+45
2023-06-10[install] fix life cycle scripts execution (#3235)Gravatar Alex Lam S.L 2-14/+102
[install] fix life cycle scripts execution - scripts from dependencies did not run during re-installation - `bun.lockb` now contains data on life cycle scripts - handle prior lockfile format by reading missing info from every `package.json` - suppress spurious log output from tests
2023-06-09Fix to retain a newline after removing a package (#3231)Gravatar ytakhs 1-0/+288
2023-06-02Support `NO_COLOR` environment variable (#3055)Gravatar Ashcon Partovi 1-0/+35
2023-06-01Fix github annotation when using inspect() (#3166)Gravatar Ashcon Partovi 1-1/+17
2023-06-01Implement `__dirname` and `__filename`, allow direct eval in CommonJS (#3164)Gravatar Jarred Sumner 2-1/+15
* Implement `__dirname` and `__filename`, allow direct eval in CommonJS * Fixup dirname and add test --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-06-01mark currently known test fails as `.todo` (#3052)Gravatar dave caruso 3-51/+26
* start this * commit * mark all failing tests as todo * fasdfad * bundler tests * tests * adjust failing tests to todo * comment out some more tests * png as test
2023-05-31Small improvements to `bun test` (#3071)Gravatar Ashcon Partovi 1-12/+370
* Change status icon for skipped tests from "-" to "»" * Show file path instead of filename in `bun test` * Emit collapsable logs when running `bun test` in Github Actions https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#grouping-log-lines * Add fallback for test icons when emojis are not available * Only check for GITHUB_ACTIONS when running `bun test` * Emit error annotations when running `bun test` in Github Actions https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-error-message * Remove ANSI output from Github annotation, it doesn't work * Remove outdated code from internal test runner * Add GithubActionFormatter to handle cases where error name or message is already ANSI * Fix formatting of test * Fix #3070 * Implement `bun test --run-todo` By default, `test.todo()` is no longer run, unless `--run-todo` is specified. * Fix test that relies on test.todo() being run * Support vitest-style test options * Disable GITHUB_ACTION in test harness * Add types for TestOptions * Fix bug where test.skip() actually ran * Implement `test.skipIf()` and `describe.skipIf()` * Implement `test.runIf()` * Move DiffFormatter to its own file * Fix bug where Bun.inspect() would emit a Github annotation * Introduce `bun test --only`, rename `--run-todo` to `--todo` * Implement `test.if()`, `describe.if()`, and other test fixes * Remove unwanted files from last commit * Fix last reference to --run-todo * Fix memory issues with printing github actions text * Update bindings.zig * Fix bug with `test.only()` * Remove debug test * Make the github annotations better * Improve .vscode/launch.json * Implement `expect().toBeNil()` * Remove .only() from test * Implement toBeBoolean(), toBeTrue(), toBeFalse() * Add lots of matchers * toBeNil() * toBeBoolean() * toBeTrue() * toBeFalse() * toBeNumber() * toBeInteger() * toBeFinite() * toBePositive() * toBeNegative() * toBeWithin() * toBeSymbol() * toBeFunction() * toBeDate() * toBeString() * toInclude() * toStartWith() * toEndWith() * Fix #3135 * Reduce verbosity of test * Fix snapshot bug --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-29Cleanup CommonJS changes (#3112)bun-v0.6.5Gravatar Jarred Sumner 1-0/+9
* Add more GC in test * Fix handling of functions and re-assignments in CommonJS * Increase timeout --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-28[node:net] fix createConnection options passing (#3101)Gravatar Ciro Spaciari 1-2/+2
* fixup createConnection * fix comment * fixup comment * also fix it on tls
2023-05-27Implement process.env.npm_lifecycle_event (#3097)Gravatar Tiramify (A.K. Daniel) 2-43/+17
* Update run_command.zig * Update env.test.ts * Add files via upload * Update run-process-env.test.ts * Update env.test.ts * Update harness.ts
2023-05-25[install] fix `.bin` linking (#3067)Gravatar Alex Lam S.L 2-3/+158
- causes intermittent `bun install` failures on `bun-types`
2023-05-24Load `.env.test`, set NODE_ENV=test in `bun test`, load ↵Gravatar Jarred Sumner 1-0/+256
`.env.{test,production,development}.local` (#3037) * Support `.env.test` & `.env.{test,production,development}.local` * Fix bug preventing inlining of process.env.NODE_ENV by default * Update env_loader.zig * add env tests --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: dave caruso <me@paperdave.net>
2023-05-24Implement `require.cache` (#3045)Gravatar Jarred Sumner 3-0/+39
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-24extend test time-outs (#3048)Gravatar Alex Lam S.L 2-7/+7
- avoid intermittent failures due to network latencies
2023-05-23Implement `bun test --timeout` (#3040)Gravatar Ashcon Partovi 1-0/+66
You can change the default per-test timeout in `bun test`: > bun test --timeout 10 The default timeout is 5000.
2023-05-16Update run-cjs.test.tsGravatar Jarred Sumner 1-1/+0
2023-05-16Fix running commonjs modules as entry point (#2885)Gravatar dave caruso 1-0/+60
* fix cjs run issue * use a primordial * fix behavior * fix it again * fix tste
2023-05-10`bun add` from root folder when call within workspaces (#2841)Gravatar Alex Lam S.L 2-7/+65
- ignore invalid `package.json` from parent directories - `echo` new lines from `make` targets correctly