diff --git a/.github/workflows/bun-linux-build.yml b/.github/workflows/bun-linux-build.yml index 9fee3f623e..bee8cee6ac 100644 --- a/.github/workflows/bun-linux-build.yml +++ b/.github/workflows/bun-linux-build.yml @@ -259,6 +259,8 @@ jobs: bun install --cwd=test --verbose bun install --cwd=packages/bun-internal-test --verbose + bun install --cwd=test/js/third_party/prisma --verbose + # This is disabled because the cores are ~5.5gb each # so it is easy to hit 50gb coredump downloads. Only enable if you need to retrive one diff --git a/.github/workflows/bun-mac-x64-baseline.yml b/.github/workflows/bun-mac-x64-baseline.yml index b399cb3101..3e1493f2b9 100644 --- a/.github/workflows/bun-mac-x64-baseline.yml +++ b/.github/workflows/bun-mac-x64-baseline.yml @@ -379,7 +379,8 @@ jobs: name: macOS Test runs-on: ${{ matrix.runner }} needs: [macOS] - if: github.event_name == 'pull_request' && github.repository_owner == 'oven-sh' + # if: github.event_name == 'pull_request' && github.repository_owner == 'oven-sh' + if: false permissions: pull-requests: write timeout-minutes: 30 diff --git a/.github/workflows/bun-windows-x64.yml b/.github/workflows/bun-windows.yml similarity index 63% rename from .github/workflows/bun-windows-x64.yml rename to .github/workflows/bun-windows.yml index 03bec3eafd..9270085d4b 100644 --- a/.github/workflows/bun-windows-x64.yml +++ b/.github/workflows/bun-windows.yml @@ -1,7 +1,7 @@ -name: bun-windows-x64 +name: bun-windows concurrency: - group: bun-windows-x64-${{ github.ref }} + group: bun-windows-${{ github.ref }} cancel-in-progress: true env: @@ -9,7 +9,7 @@ env: LLVM_VERSION: 16.0.6 BUN_DOWNLOAD_URL_BASE: https://pub-5e11e972747a44bf9aaf9394f185a982.r2.dev/releases/latest - tag: bun-windows-x64 + tag: bun-windows # TODO: wire this up to workflow_dispatch. # github's expression syntax makes this hard to set a default to true canary: true @@ -103,7 +103,7 @@ jobs: - name: Upload Zig Object uses: actions/upload-artifact@v3 with: - name: ${{ env.tag }}-zig${{ matrix.cpu == 'nehalem' && '-baseline' || '' }} + name: ${{ env.tag }}-${{ matrix.arch == 'x86_64' && 'x64' || 'aarch64' }}-zig${{ matrix.cpu == 'nehalem' && '-baseline' || '' }} path: ${{runner.temp}}/release/bun-zig.o windows-dependencies: @@ -127,7 +127,8 @@ jobs: git submodule | Where-Object { $_ -notmatch 'WebKit' } clang --version rustc --version - Get-Content -Path (Get-ChildItem -Path 'scripts/build*.sh', 'scripts/all-dependencies.sh' | Sort-Object -Property Name).FullName | Out-String + Get-Content -Path (Get-ChildItem -Path 'scripts/build*.ps1', 'scripts/all-dependencies.ps1', 'scripts/env.ps1' | Sort-Object -Property Name).FullName | Out-String + echo 1 })" $hash = ( -join ((New-Object -TypeName System.Security.Cryptography.SHA1CryptoServiceProvider).ComputeHash([System.Text.Encoding]::UTF8.GetBytes($data)) | ForEach-Object { $_.ToString("x2") } )).Substring(0, 10) echo "sha=${hash}" >> $env:GITHUB_OUTPUT @@ -138,7 +139,7 @@ jobs: uses: actions/cache/restore@v3 with: path: bun-deps - key: bun-deps-${{ env.tag }}${{ matrix.cpu == 'nehalem' && '-baseline' || '' }}-${{ steps.submodule-versions.outputs.sha }} + key: bun-deps-${{ env.tag }}-${{ matrix.arch == 'x86_64' && 'x64' || 'aarch64' }}${{ matrix.cpu == 'nehalem' && '-baseline' || '' }}-${{ steps.submodule-versions.outputs.sha }} - name: Install LLVM ${{ env.LLVM_VERSION }} if: ${{ !steps.cache-deps-restore.outputs.cache-hit }} @@ -164,7 +165,7 @@ jobs: - name: Upload Dependencies uses: actions/upload-artifact@v3 with: - name: ${{ env.tag }}-deps${{ matrix.cpu == 'nehalem' && '-baseline' || '' }} + name: ${{ env.tag }}-${{ matrix.arch == 'x86_64' && 'x64' || 'aarch64' }}-deps${{ matrix.cpu == 'nehalem' && '-baseline' || '' }} path: bun-deps/ - name: Cache Dependencies @@ -180,6 +181,10 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 10 if: github.repository_owner == 'oven-sh' + strategy: + fail-fast: false + matrix: + arch: [x86_64] steps: - uses: actions/checkout@v4 - run: | @@ -194,7 +199,7 @@ jobs: echo "canary_revision=$(GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}" bash ./scripts/calculate-canary-revision.sh --raw)" > build-codegen-win32-x64/.canary_revision - uses: actions/upload-artifact@v3 with: - name: ${{ env.tag }}-codegen + name: ${{ env.tag }}-${{ matrix.arch == 'x86_64' && 'x64' || 'aarch64' }}-codegen path: build-codegen-win32-x64/ windows-cpp: @@ -217,7 +222,7 @@ jobs: - name: Download Codegen uses: actions/download-artifact@v3 with: - name: ${{ env.tag }}-codegen + name: ${{ env.tag }}-${{ matrix.arch == 'x86_64' && 'x64' || 'aarch64' }}-codegen path: build - name: Build C++ run: | @@ -252,7 +257,7 @@ jobs: if ($LASTEXITCODE -ne 0) { throw "C++ compilation failed" } - uses: actions/upload-artifact@v3 with: - name: ${{ env.tag }}-cpp${{ matrix.cpu == 'nehalem' && '-baseline' || '' }} + name: ${{ env.tag }}-${{ matrix.arch == 'x86_64' && 'x64' || 'aarch64' }}-cpp${{ matrix.cpu == 'nehalem' && '-baseline' || '' }} path: build/bun-cpp-objects.a windows-link: @@ -276,22 +281,22 @@ jobs: - name: Download Codegen uses: actions/download-artifact@v3 with: - name: ${{ env.tag }}-codegen + name: ${{ env.tag }}-${{ matrix.arch == 'x86_64' && 'x64' || 'aarch64' }}-codegen path: build - name: Download Dependencies uses: actions/download-artifact@v3 with: - name: ${{ env.tag }}-deps${{ matrix.cpu == 'nehalem' && '-baseline' || '' }} + name: ${{ env.tag }}-${{ matrix.arch == 'x86_64' && 'x64' || 'aarch64' }}-deps${{ matrix.cpu == 'nehalem' && '-baseline' || '' }} path: bun-deps - name: Download Zig Object uses: actions/download-artifact@v3 with: - name: ${{ env.tag }}-zig${{ matrix.cpu == 'nehalem' && '-baseline' || '' }} + name: ${{ env.tag }}-${{ matrix.arch == 'x86_64' && 'x64' || 'aarch64' }}-zig${{ matrix.cpu == 'nehalem' && '-baseline' || '' }} path: bun-zig - name: Download C++ Objects uses: actions/download-artifact@v3 with: - name: ${{ env.tag }}-cpp${{ matrix.cpu == 'nehalem' && '-baseline' || '' }} + name: ${{ env.tag }}-${{ matrix.arch == 'x86_64' && 'x64' || 'aarch64' }}-cpp${{ matrix.cpu == 'nehalem' && '-baseline' || '' }} path: bun-cpp - name: Link run: | @@ -313,13 +318,13 @@ jobs: if ($LASTEXITCODE -ne 0) { throw "Link failed!" } - name: Package run: | - $Dist = mkdir -Force "${{ env.tag }}" + $Dist = mkdir -Force "${{ env.tag }}-${{ matrix.arch == 'x86_64' && 'x64' || 'aarch64' }}${{ matrix.cpu == 'nehalem' && '-baseline' || '' }}" cp -r build\bun.exe "$Dist\bun.exe" - Compress-Archive $Dist ${{ env.tag }}${{ matrix.cpu == 'nehalem' && '-baseline' || '' }}.zip + Compress-Archive $Dist ${{ env.tag }}-${{ matrix.arch == 'x86_64' && 'x64' || 'aarch64' }}${{ matrix.cpu == 'nehalem' && '-baseline' || '' }}.zip - uses: actions/upload-artifact@v3 with: - name: ${{ env.tag }}${{ matrix.cpu == 'nehalem' && '-baseline' || '' }} - path: ${{ env.tag }}${{ matrix.cpu == 'nehalem' && '-baseline' || '' }}.zip + name: ${{ env.tag }}-${{ matrix.arch == 'x86_64' && 'x64' || 'aarch64' }}${{ matrix.cpu == 'nehalem' && '-baseline' || '' }} + path: ${{ env.tag }}-${{ matrix.arch == 'x86_64' && 'x64' || 'aarch64' }}${{ matrix.cpu == 'nehalem' && '-baseline' || '' }}.zip - name: Release id: release uses: ncipollo/release-action@v1 @@ -336,7 +341,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} name: "Canary (${{github.sha}})" tag: "canary" - artifacts: "${{env.tag}}${{ matrix.cpu == 'nehalem' && '-baseline' || '' }}.zip" + artifacts: "${{env.tag}}-${{ matrix.arch == 'x86_64' && 'x64' || 'aarch64' }}${{ matrix.cpu == 'nehalem' && '-baseline' || '' }}.zip" - uses: sarisia/actions-status-discord@v1 if: failure() && github.repository_owner == 'oven-sh' && github.event_name == 'pull_request' with: @@ -346,13 +351,111 @@ jobs: noprefix: true nocontext: true description: | - Pull Request ### [${{github.event.pull_request.title}}](https://github.com/oven-sh/bun/pull/${{github.event.number}}) @${{ github.actor }} - Build failed on ${{ env.tag }}: + Build failed on Windows ${{ matrix.arch }}${{ matrix.cpu == 'nehalem' && ' Baseline' || '' }} - **[View build output](https://github.com/oven-sh/bun/actions/runs/${{github.run_id}})** + **[Build Output](https://github.com/oven-sh/bun/actions/runs/${{github.run_id}})** | [Commit](https://github.com/oven-sh/bun/commits/${{github.sha}}) + windows-test: + name: Test + runs-on: windows-latest + needs: [windows-link] + if: github.event_name == 'pull_request' && github.repository_owner == 'oven-sh' + permissions: + pull-requests: write + timeout-minutes: 30 + outputs: + failing_tests: ${{ steps.test.outputs.failing_tests }} + failing_tests_count: ${{ steps.test.outputs.failing_tests_count }} + strategy: + fail-fast: false + matrix: + # TODO: test baseline, disabled due to noise + cpu: [haswell] + arch: [x86_64] + steps: + - id: checkout + name: Checkout + uses: actions/checkout@v3 + with: + submodules: false + - id: download + name: Download Release + uses: actions/download-artifact@v3 + with: + name: ${{ env.tag }}-${{ matrix.arch == 'x86_64' && 'x64' || 'aarch64' }}${{ matrix.cpu == 'nehalem' && '-baseline' || '' }} + path: ${{runner.temp}}/release + - name: Install Bun + run: | + cd ${{runner.temp}}/release + unzip ${{env.tag}}-${{ matrix.arch == 'x86_64' && 'x64' || 'aarch64' }}${{ matrix.cpu == 'nehalem' && '-baseline' || '' }}.zip + cd ${{env.tag}}-${{ matrix.arch == 'x86_64' && 'x64' || 'aarch64' }}${{ matrix.cpu == 'nehalem' && '-baseline' || '' }} + pwd >> $env:GITHUB_PATH + - name: Install Node + uses: actions/setup-node@v4 + with: + node-version: 20 + - name: Install dependencies + run: | + # bun install --verbose + # bun install --cwd=test --verbose + # bun install --cwd=packages/bun-internal-test --verbose - [Commit ${{github.sha}}](https://github.com/oven-sh/bun/commits/${{github.sha}}) + npm install + cd test && npm install + cd ../packages/bun-internal-test && npm install + cd ../.. + - id: test + name: Run tests + env: + SMTP_SENDGRID_SENDER: ${{ secrets.SMTP_SENDGRID_SENDER }} + TLS_MONGODB_DATABASE_URL: ${{ secrets.TLS_MONGODB_DATABASE_URL }} + TLS_POSTGRES_DATABASE_URL: ${{ secrets.TLS_POSTGRES_DATABASE_URL }} + run: | + try { + $ErrorActionPreference = "SilentlyContinue" + $null = node packages/bun-internal-test/src/runner.node.mjs ${{runner.temp}}/release/${{env.tag}}-${{ matrix.arch == 'x86_64' && 'x64' || 'aarch64' }}${{ matrix.cpu == 'nehalem' && '-baseline' || '' }}/bun.exe || $true + } catch {} + $ErrorActionPreference = "Stop" + - uses: sarisia/actions-status-discord@v1 + if: always() && steps.test.outputs.regressing_tests != '' && github.event_name == 'pull_request' + with: + title: "" + webhook: ${{ secrets.DISCORD_WEBHOOK }} + status: "failure" + noprefix: true + nocontext: true + description: | + ### ❌🪟 [${{github.event.pull_request.title}}](https://github.com/oven-sh/bun/pull/${{github.event.number}}) + + @${{ github.actor }}, there are **${{ steps.test.outputs.regressing_test_count }} test regressions** on Windows ${{ matrix.arch }}${{ matrix.cpu == 'nehalem' && ' Baseline' || '' }} + + ${{ steps.test.outputs.regressing_tests }} + + [Full Test Output](https://github.com/oven-sh/bun/actions/runs/${{github.run_id}}) + - name: Comment on PR + if: always() && steps.test.outputs.regressing_tests != '' && github.event_name == 'pull_request' + uses: thollander/actions-comment-pull-request@v2 + with: + comment_tag: test-windows-${{ matrix.arch }}-${{ matrix.cpu }} + message: | + ### ❌🪟 @${{ github.actor }}, there are **${{ steps.test.outputs.regressing_test_count }} test regressions** on Windows ${{ matrix.arch }}${{ matrix.cpu == 'nehalem' && ' Baseline' || '' }} + + ${{ steps.test.outputs.regressing_tests }} + + [Full Test Output](https://github.com/oven-sh/bun/actions/runs/${{github.run_id}}) + - name: Uncomment on PR + if: steps.test.outputs.regressing_tests == '' && github.event_name == 'pull_request' + uses: thollander/actions-comment-pull-request@v2 + with: + comment_tag: test-windows-${{ matrix.arch }}-${{ matrix.cpu }} + mode: upsert + create_if_not_exists: false + message: | + ✅🪟 Test regressions on Windows ${{ matrix.arch }}${{ matrix.cpu == 'nehalem' && ' Baseline' || '' }} have been resolved. + - id: fail + name: Fail the build + if: steps.test.outputs.regressing_tests != '' && github.event_name == 'pull_request' + run: exit 1 diff --git a/.gitignore b/.gitignore index 78febd9761..8721435d6b 100644 --- a/.gitignore +++ b/.gitignore @@ -161,4 +161,6 @@ x64 .vs -**/.verdaccio-db.json \ No newline at end of file +**/.verdaccio-db.json +/test-report.md +/test-report.json \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index cbf79bad7d..2ce919cfc4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -978,7 +978,9 @@ if(WIN32) "BORINGSSL_NO_CXX=1" # lol ) + # set_property(TARGET ${bun} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded") set_property(TARGET ${bun} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreadedDLL") + target_compile_options(${bun} PUBLIC "/EHsc" "/GR-") target_link_options(${bun} PUBLIC "/STACK:0x1200000,0x100000") else() diff --git a/package.json b/package.json index bed97141b6..584b72756f 100644 --- a/package.json +++ b/package.json @@ -21,10 +21,13 @@ "build:release": "cmake . -DCMAKE_BUILD_TYPE=Release -GNinja -Bbuild-release && ninja -Cbuild-release", "build:safe": "cmake . -DZIG_OPTIMIZE=ReleaseSafe -DUSE_DEBUG_JSC=ON -DCMAKE_BUILD_TYPE=Release -GNinja -Bbuild-safe && ninja -Cbuild-safe", "typecheck": "tsc --noEmit && cd test && bun run typecheck", - "fmt": "prettier --write --cache './{src,test,bench,packages/{bun-types,bun-inspector-*,bun-vscode,bun-debug-adapter-protocol}}/**/*.{mjs,ts,tsx,js,jsx}'", + "fmt": "prettier --write --cache \"./{src,test,bench,packages/{bun-types,bun-inspector-*,bun-vscode,bun-debug-adapter-protocol}}/**/*.{mjs,ts,tsx,js,jsx}\"", "fmt:zig": "zig fmt src/*.zig src/**/*.zig", "lint": "eslint './**/*.d.ts' --cache", - "lint:fix": "eslint './**/*.d.ts' --cache --fix" + "lint:fix": "eslint './**/*.d.ts' --cache --fix", + "test": "node packages/bun-internal-test/src/runner.node.mjs ./build/bun-debug", + "test:release": "node packages/bun-internal-test/src/runner.node.mjs ./build-release/bun", + "update-known-failures": "node packages/bun-internal-test/src/update-known-windows-failures.mjs" }, "devDependencies": { "@types/react": "^18.0.25", diff --git a/packages/bun-internal-test/src/runner.node.mjs b/packages/bun-internal-test/src/runner.node.mjs index 1e2e9982e9..d066c5d8cf 100644 --- a/packages/bun-internal-test/src/runner.node.mjs +++ b/packages/bun-internal-test/src/runner.node.mjs @@ -1,41 +1,49 @@ import * as action from "@actions/core"; -import { spawnSync } from "child_process"; +import { spawn, spawnSync } from "child_process"; import { rmSync, writeFileSync, readFileSync } from "fs"; +import { readFile } from "fs/promises"; import { readdirSync } from "node:fs"; import { resolve, basename } from "node:path"; -import { totalmem } from "os"; +import { cpus, hostname, totalmem, userInfo } from "os"; import { fileURLToPath } from "url"; +const run_start = new Date(); + +const windows = process.platform === "win32"; + const nativeMemory = totalmem(); -const BUN_JSC_forceRAMSizeNumber = parseInt(process.env["BUN_JSC_forceRAMSize"] || "0", 10); -let BUN_JSC_forceRAMSize = Number(BigInt(nativeMemory) >> BigInt(2)) + ""; -if (!(Number.isSafeInteger(BUN_JSC_forceRAMSizeNumber) && BUN_JSC_forceRAMSizeNumber > 0)) { - BUN_JSC_forceRAMSize = BUN_JSC_forceRAMSizeNumber + ""; +const force_ram_size_input = parseInt(process.env["BUN_JSC_forceRAMSize"] || "0", 10); +let force_ram_size = Number(BigInt(nativeMemory) >> BigInt(2)) + ""; +if (!(Number.isSafeInteger(force_ram_size_input) && force_ram_size_input > 0)) { + force_ram_size = force_ram_size_input + ""; } const cwd = resolve(fileURLToPath(import.meta.url), "../../../../"); process.chdir(cwd); -const isAction = !!process.env["GITHUB_ACTION"]; +const ci = !!process.env["GITHUB_ACTIONS"]; +const enableProgressBar = !ci; -let testList = []; -if (process.platform == "win32") { - testList = readFileSync("test/windows-test-allowlist.txt", "utf8") - .replaceAll("\r", "") - .split("\n") - .map(x => x.trim().replaceAll("/", "\\")) - .filter(x => !!x && !x.startsWith("#")); +function defaultConcurrency() { + // Concurrency causes more flaky tests, only enable it by default on windows + // See https://github.com/oven-sh/bun/issues/8071 + if (windows) { + return Math.floor((cpus().length - 2) / 2); + } + return 1; } +const run_concurrency = Math.max(Number(process.env["BUN_TEST_CONCURRENCY"] || defaultConcurrency(), 10), 1); + const extensions = [".js", ".ts", ".jsx", ".tsx"]; +const git_sha = + process.env["GITHUB_SHA"] ?? spawnSync("git", ["rev-parse", "HEAD"], { encoding: "utf-8" }).stdout.trim(); + function isTest(path) { if (!basename(path).includes(".test.") || !extensions.some(ext => path.endsWith(ext))) { return false; } - if (testList.length > 0) { - return testList.some(testPattern => path.includes(testPattern)); - } return true; } @@ -50,103 +58,373 @@ function* findTests(dir, query) { } } -var failingTests = []; - -let bunExe = process.argv[2] ?? "bun"; -try { - const { error } = spawnSync(bunExe, ["--revision"]); - if (error) throw error; -} catch { - console.error(bunExe + " is not installed"); +// pick the last one, kind of a hack to allow 'bun run test bun-release' to test the release build +let bunExe = (process.argv.length > 2 ? process.argv[process.argv.length - 1] : null) ?? "bun"; +const { error, stdout: revision_stdout } = spawnSync(bunExe, ["--revision"], { + env: { ...process.env, BUN_DEBUG_QUIET_LOGS: 1 }, +}); +if (error) { + if (error.code !== "ENOENT") throw error; + console.error(`\x1b[31merror\x1b[0;2m:\x1b[0m Could not find Bun executable at '${bunExe}'`); + process.exit(1); } +const revision = revision_stdout.toString().trim(); -const ntStatusPath = 'C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\shared\\ntstatus.h'; -let ntStatusHCached = null; +const { error: error2, stdout: argv0_stdout } = spawnSync(bunExe, ["-e", "console.log(process.argv[0])"], { + env: { ...process.env, BUN_DEBUG_QUIET_LOGS: 1 }, +}); +if (error2) throw error2; +const argv0 = argv0_stdout.toString().trim(); + +console.log(`Testing ${argv0} v${revision}`); + +const ntStatusPath = "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\shared\\ntstatus.h"; +let ntstatus_header_cache = null; function lookupWindowsError(code) { - if (ntStatusHCached === null) { + if (ntstatus_header_cache === null) { try { - ntStatusHCached = readFileSync(ntStatusPath, 'utf-8'); + ntstatus_header_cache = readFileSync(ntStatusPath, "utf-8"); } catch { console.error(`could not find ntstatus.h to lookup error code: ${ntStatusPath}`); - ntStatusHCached = ''; + ntstatus_header_cache = ""; } } - const match = ntStatusHCached.match(new RegExp(`(STATUS_\\w+).*0x${code.toString(16)}`, 'i')); + const match = ntstatus_header_cache.match(new RegExp(`(STATUS_\\w+).*0x${code.toString(16)}`, "i")); if (match) { return match[1]; } - return `unknown`; + return null; } +const failing_tests = []; +const passing_tests = []; +const fixes = []; +const regressions = []; + async function runTest(path) { const name = path.replace(cwd, "").slice(1); - try { - var { - stdout, - stderr, - status: exitCode, - signal, - error: timedOut, - } = spawnSync(bunExe, ["test", resolve(path)], { - stdio: "inherit", + let exitCode, signal, err, output; + + const expected_crash_reason = windows + ? await readFile(resolve(path), "utf-8").then(data => { + const match = data.match(/@known-failing-on-windows:(.*)\n/); + return match ? match[1].trim() : null; + }) + : null; + + const start = Date.now(); + + await new Promise((done, reject) => { + const proc = spawn(bunExe, ["test", resolve(path)], { + stdio: ["ignore", "pipe", "pipe"], timeout: 1000 * 60 * 3, env: { ...process.env, FORCE_COLOR: "1", BUN_GARBAGE_COLLECTOR_LEVEL: "1", - BUN_JSC_forceRAMSize, + BUN_JSC_forceRAMSize: force_ram_size, BUN_RUNTIME_TRANSPILER_CACHE_PATH: "0", // reproduce CI results locally - GITHUB_ACTION: process.env.GITHUB_ACTION ?? "true", + GITHUB_ACTIONS: process.env.GITHUB_ACTIONS ?? "true", BUN_DEBUG_QUIET_LOGS: "1", }, }); - } catch (e) { - console.error(e); - } - if(signal) { - console.error(`Test ${name} was killed by signal ${signal}`); - } + const chunks = []; + proc.stdout.on("data", chunk => { + chunks.push(chunk); + if (run_concurrency === 1) process.stdout.write(chunk); + }); + proc.stderr.on("data", chunk => { + chunks.push(chunk); + if (run_concurrency === 1) process.stderr.write(chunk); + }); - if(process.platform === 'win32' && exitCode > 256) { - console.error(`Test ${name} crashed with exit code ${exitCode.toString(16)} (${lookupWindowsError(exitCode)})`); - } + proc.on("exit", (code_, signal_) => { + exitCode = code_; + signal = signal_; + output = Buffer.concat(chunks).toString(); + done(); + }); + proc.on("error", err_ => { + err = err_; + done(); + }); + }); - const passed = exitCode === 0 && !timedOut; + const passed = exitCode === 0 && !err && !signal; + let reason = ""; if (!passed) { - failingTests.push(name); - if (timedOut) console.error(timedOut); - } -} - -var tests = []; -var testFileNames = []; -for (const path of findTests(resolve(cwd, "test"))) { - testFileNames.push(path); - tests.push(runTest(path).catch(console.error)); -} -await Promise.allSettled(tests); - -rmSync("failing-tests.txt", { force: true }); - -if (isAction) { - if (failingTests.length > 0) { - action.setFailed(`${failingTests.length} files with failing tests`); - } - action.setOutput("failing_tests", failingTests.map(a => `- \`${a}\``).join("\n")); - action.setOutput("failing_tests_count", failingTests.length); - action.summary.addHeading(`${tests.length} files with tests ran`).addList(testFileNames); - await action.summary.write(); -} else { - if (failingTests.length > 0) { - console.log(`${failingTests.length} files with failing tests:`); - for (const test of failingTests) { - console.log(`- ${resolve(test)}`); + let match; + if (err && err.message.includes("timed")) { + reason = "hang"; + } else if ((match = output && output.match(/thread \d+ panic: (.*)\n/))) { + reason = 'panic "' + match[1] + '"'; + } else if (err) { + reason = (err.name || "Error") + ": " + err.message; + } else if (signal) { + reason = signal; + } else if (exitCode === 1) { + const failMatch = output.match(/\x1b\[31m\s(\d+) fail/); + if (failMatch) { + reason = failMatch[1] + " failing"; + } else { + reason = "code 1"; + } + } else { + const x = windows && lookupWindowsError(exitCode); + if (x) { + if (x === "STATUS_BREAKPOINT") { + if (output.includes("Segmentation fault at address")) { + reason = "STATUS_ACCESS_VIOLATION"; + } + } + reason = x; + } else { + reason = "code " + exitCode; + } } } - writeFileSync("failing-tests.txt", failingTests.join("\n")); + + const duration = (Date.now() - start) / 1000; + + if (run_concurrency !== 1 && enableProgressBar) { + // clear line + process.stdout.write("\x1b[2K\r"); + } + + console.log( + `\x1b[2m${formatTime(duration).padStart(6, " ")}\x1b[0m ${ + passed ? "\x1b[32m✔" : expected_crash_reason ? "\x1b[33m⚠" : "\x1b[31m✖" + } ${name}\x1b[0m${reason ? ` (${reason})` : ""}`, + ); + + finished++; + + if (run_concurrency !== 1 && enableProgressBar) { + writeProgressBar(); + } + + if (run_concurrency > 1 && ci) { + process.stderr.write(output); + } + + if (!passed) { + if (reason) { + if (windows && !expected_crash_reason) { + regressions.push({ path: name, reason, output }); + } + } + + failing_tests.push({ path: name, reason, output, expected_crash_reason }); + if (err) console.error(err); + } else { + if (windows && expected_crash_reason !== null) { + fixes.push({ path: name, output, expected_crash_reason }); + } + + passing_tests.push(name); + } } -process.exit(Math.min(failingTests.length, 127)); +const queue = [...findTests(resolve(cwd, "test"))]; +let running = 0; +let total = queue.length; +let finished = 0; +let on_entry_finish = null; + +function writeProgressBar() { + const barWidth = Math.min(process.stdout.columns || 40, 80) - 2; + const percent = (finished / total) * 100; + const bar = "=".repeat(Math.floor(percent / 2)); + const str1 = `[${finished}/${total}] [${bar}`; + process.stdout.write(`\r${str1}${" ".repeat(barWidth - str1.length)}]`); +} + +while (queue.length > 0) { + if (running >= run_concurrency) { + await new Promise(resolve => (on_entry_finish = resolve)); + continue; + } + + const path = queue.shift(); + running++; + runTest(path) + .catch(e => { + console.error("Bug in bun-internal-test"); + console.error(e); + process.exit(1); + }) + .finally(() => { + running--; + if (on_entry_finish) { + on_entry_finish(); + on_entry_finish = null; + } + }); +} +while (running > 0) { + await Promise.race([ + new Promise(resolve => (on_entry_finish = resolve)), + new Promise(resolve => setTimeout(resolve, 1000)), + ]); +} +console.log("\n"); + +function linkToGH(linkTo) { + return `https://github.com/oven-sh/bun/blob/${git_sha}/${linkTo}`; +} + +function sectionLink(linkTo) { + return "#" + linkTo.replace(/[^a-zA-Z0-9_-]/g, "").toLowerCase(); +} + +const failingTestDisplay = failing_tests + .filter(({ reason }) => !regressions.some(({ path }) => path === path)) + .map(({ path, reason }) => `- [\`${path}\`](${sectionLink(path)})${reason ? ` ${reason}` : ""}`) + .join("\n"); +// const passingTestDisplay = passing_tests.map(path => `- \`${path}\``).join("\n"); + +rmSync("report.md", { force: true }); + +const uptime = process.uptime(); + +function formatTime(seconds) { + if (seconds < 60) { + return seconds.toFixed(1) + "s"; + } else if (seconds < 60 * 60) { + return (seconds / 60).toFixed(0) + "m " + formatTime(seconds % 60); + } else { + return (seconds / 60 / 60).toFixed(0) + "h " + formatTime(seconds % (60 * 60)); + } +} + +const header = ` +host: ${process.env["GITHUB_RUN_ID"] ? "GitHub Actions: " : ""}${userInfo().username}@${hostname()} +platform: ${process.platform} ${process.arch} +bun: ${argv0} +version: v${revision} + +date: ${run_start.toISOString()} +duration: ${formatTime(uptime)} + +total: ${total} files +failing: ${failing_tests.length} files +passing: ${passing_tests.length} files + +percent: ${((passing_tests.length / total) * 100).toFixed(2)}% +`.trim(); + +console.log("\n" + "-".repeat(Math.min(process.stdout.columns || 40, 80)) + "\n"); +console.log(header); +console.log("\n" + "-".repeat(Math.min(process.stdout.columns || 40, 80)) + "\n"); + +let report = `# bun test on ${ + process.env["GITHUB_REF"] ?? + spawnSync("git", ["rev-parse", "--abbrev-ref", "HEAD"], { encoding: "utf-8" }).stdout.trim() +} + +\`\`\` +${header} +\`\`\` + +`; + +if (fixes.length > 0) { + report += `## Fixes\n\n`; + report += "The following tests had @known-failing-on-windows but now pass:\n\n"; + report += fixes + .map( + ({ path, expected_crash_reason }) => `- [\`${path}\`](${sectionLink(path)}) (before: ${expected_crash_reason})`, + ) + .join("\n"); + report += "\n\n"; +} + +if (regressions.length > 0) { + report += `## Regressions\n\n`; + report += regressions + .map( + ({ path, reason, expected_crash_reason }) => + `- [\`${path}\`](${sectionLink(path)}) ${reason}${ + expected_crash_reason ? ` (expected: ${expected_crash_reason})` : "" + }`, + ) + .join("\n"); + report += "\n\n"; +} + +if (failingTestDisplay.length > 0) { + report += `## ${windows ? "Known " : ""}Failing tests\n\n`; + report += failingTestDisplay; + report += "\n\n"; +} + +// if(passingTestDisplay.length > 0) { +// report += `## Passing tests\n\n`; +// report += passingTestDisplay; +// report += "\n\n"; +// } + +if (failing_tests.length) { + report += `## Failing tests log output\n\n`; + for (const { path, output, reason, expected_crash_reason } of failing_tests) { + report += `### ${path}\n\n`; + report += "[Link to file](" + linkToGH(path) + ")\n\n"; + if (windows && reason !== expected_crash_reason) { + report += `To mark this as a known failing test, add this to the start of the file:\n`; + report += `\`\`\`ts\n`; + report += `// @known-failing-on-windows: ${reason}\n`; + report += `\`\`\`\n\n`; + } else { + report += `${reason}\n\n`; + } + report += "```\n"; + report += output.replace(/\x1b\[[0-9;]*m/g, "") + .replace(/^::(group|endgroup|error|warning|set-output|add-matcher|remove-matcher).*$/gm, "") + report += "```\n\n"; + } +} + +writeFileSync("test-report.md", report); +writeFileSync( + "test-report.json", + JSON.stringify({ + failing_tests, + passing_tests, + fixes, + regressions, + }), +); + +console.log("-> test-report.md, test-report.json"); + +if (ci) { + if (windows) { + if (regressions.length > 0) { + action.setFailed(`${regressions.length} regressing tests`); + } + action.setOutput( + "regressing_tests", + regressions.map(({ path }) => `- \`${path}\``).join("\n"), + ); + action.setOutput("regressing_test_count", regressions.length); + } else { + if (failing_tests.length > 0) { + action.setFailed(`${failing_tests.length} files with failing tests`); + } + action.setOutput("failing_tests", failingTestDisplay); + action.setOutput("failing_tests_count", failing_tests.length); + } + action.summary.addRaw(report); + await action.summary.write(); +} else { + if (windows && (regressions.length > 0 || fixes.length > 0)) { + console.log( + "\n\x1b[34mnote\x1b[0;2m:\x1b[0m If you would like to update the @known-failing-on-windows annotations, run `bun update-known-failures`", + ); + } +} + +process.exit(failing_tests.length ? 1 : 0); diff --git a/packages/bun-internal-test/src/update-known-windows-failures.mjs b/packages/bun-internal-test/src/update-known-windows-failures.mjs new file mode 100644 index 0000000000..bee2f7e052 --- /dev/null +++ b/packages/bun-internal-test/src/update-known-windows-failures.mjs @@ -0,0 +1,49 @@ +import assert from "assert"; +import { existsSync, readFileSync, writeFileSync } from "fs"; +import { join } from "path"; +import { fileURLToPath } from "url"; + +if (process.platform !== "win32") { + console.log("This script is only intended to be run on Windows."); + process.exit(1); +} + +process.chdir(join(fileURLToPath(import.meta.url), "../../../../")); + +if (!existsSync("test-report.json")) { + console.log("No test report found. Please run `bun run test` first."); + process.exit(1); +} + +const test_report = JSON.parse(readFileSync("test-report.json", "utf8")); +assert(Array.isArray(test_report.failing_tests)); + +for (const { path, reason, expected_crash_reason } of test_report.failing_tests) { + assert(path); + assert(reason); + + if (expected_crash_reason !== reason) { + const old_content = readFileSync(path, "utf8"); + if (!old_content.includes("// @known-failing-on-windows")) { + let content = old_content.replace(/\/\/\s*@known-failing-on-windows:.*\n/, ""); + if (reason) { + content = `// @known-failing-on-windows: ${reason}\n` + content; + } + writeFileSync(path, content, "utf8"); + console.log(path); + } + } +} + +for (const { path } of test_report.fixes) { + assert(path); + + const old_content = readFileSync(path, "utf8"); + + let content = old_content.replace(/\/\/\s*@known-failing-on-windows:.*\n/, ""); + + if (content !== old_content) { + writeFileSync(path, content, "utf8"); + console.log(path); + } +} diff --git a/scripts/codegen.ps1 b/scripts/codegen.ps1 index fb55655376..98027335b3 100644 --- a/scripts/codegen.ps1 +++ b/scripts/codegen.ps1 @@ -11,5 +11,7 @@ Set-Content $Script1 -Force -NoNewline -Value $CrossCompileCodegen Set-Content $Script2 -Force -NoNewline -Value $CreateHashTable # copy into build-release as well +Remove-Item -Path "build-release/codegen" -Recurse -Force -ErrorAction SilentlyContinue +Remove-Item -Path "build-release/js" -Recurse -Force -ErrorAction SilentlyContinue Copy-Item -Path "build/codegen" -Destination "build-release/codegen" -Recurse -Force -Copy-Item -Path "build/js" -Destination "build-release/codegen" -Recurse -Force \ No newline at end of file +Copy-Item -Path "build/js" -Destination "build-release/js" -Recurse -Force \ No newline at end of file diff --git a/scripts/env.ps1 b/scripts/env.ps1 index 30f1851344..dce2d60549 100644 --- a/scripts/env.ps1 +++ b/scripts/env.ps1 @@ -34,7 +34,9 @@ $CC = "clang-cl" $CXX = "clang-cl" $CFLAGS = '/O2' +# $CFLAGS = '/O2 /MT' $CXXFLAGS = '/O2' +# $CXXFLAGS = '/O2 /MT' if ($Baseline) { $CFLAGS += ' -march=nehalem' @@ -49,7 +51,6 @@ $CMAKE_FLAGS = @( "-DCMAKE_C_FLAGS=`"$CFLAGS`"", "-DCMAKE_CXX_FLAGS=`"$CXXFLAGS`"" ) - $env:CC = "clang-cl" $env:CXX = "clang-cl" $env:CFLAGS = $CFLAGS diff --git a/src/bun.js/api/bun/subprocess.zig b/src/bun.js/api/bun/subprocess.zig index 9c30ba22b4..3f5ab970a0 100644 --- a/src/bun.js/api/bun/subprocess.zig +++ b/src/bun.js/api/bun/subprocess.zig @@ -2700,7 +2700,10 @@ pub const Subprocess = struct { } switch (req.ptr) { - .File, .Blob => unreachable, + .File, .Blob => { + globalThis.throwTODO("Support fd/blob backed ReadableStream in spawn stdin. See https://github.com/oven-sh/bun/issues/8049"); + return false; + }, .Direct, .JavaScript, .Bytes => { if (req.isLocked(globalThis)) { globalThis.throwInvalidArguments("ReadableStream cannot be locked", .{}); @@ -2710,11 +2713,11 @@ pub const Subprocess = struct { out_stdio.* = .{ .pipe = req }; return true; }, - else => {}, + .Invalid => { + globalThis.throwInvalidArguments("ReadableStream is in invalid state.", .{}); + return false; + }, } - - globalThis.throwInvalidArguments("Unsupported ReadableStream type", .{}); - return false; } } else if (value.asArrayBuffer(globalThis)) |array_buffer| { if (array_buffer.slice().len == 0) { diff --git a/src/bun.js/event_loop.zig b/src/bun.js/event_loop.zig index 01279412c5..f483b92fd0 100644 --- a/src/bun.js/event_loop.zig +++ b/src/bun.js/event_loop.zig @@ -931,6 +931,9 @@ pub const EventLoop = struct { any.runFromJSThread(); }, @field(Task.Tag, typeBaseName(@typeName(TimerReference))) => { + if (Environment.isWindows) { + @panic("This should not be reachable on Windows"); + } var any: *TimerReference = task.get(TimerReference).?; any.runFromJSThread(); }, diff --git a/src/cli/install.ps1 b/src/cli/install.ps1 index fbc7373057..aa427cf247 100644 --- a/src/cli/install.ps1 +++ b/src/cli/install.ps1 @@ -6,123 +6,162 @@ param( $ErrorActionPreference = "Stop" -# filter out 32 bit and arm -if ($env:PROCESSOR_ARCHITECTURE -ne "AMD64") { - Write-Output "Install Failed:" - Write-Output "Bun for Windows is only available for 64-bit Windows.`n" - exit 1 -} +# This is a functions so that in the unlikely case the baseline check fails but is is needed, we can do a recursive call. +# There are also lots of sanity checks out of fear of anti-virus software or other weird Windows things happening. +function Install-Bun { + param( + [string]$Version + [bool]$ForceBaseline = $False + ); -# if a semver is given, we need to adjust it to this format: bun-v0.0.0 -if ($Version -match "^\d+\.\d+\.\d+$") { - $Version = "bun-v$Version" -} -elseif ($Version -match "^v\d+\.\d+\.\d+$") { - $Version = "bun-$Version" -} -# todo: remove this when Bun for Windows is stable -elseif ($Version -eq "latest") { - $Version = "canary" -} - -$BunRoot = if ($env:BUN_INSTALL) { $env:BUN_INSTALL } else { "${Home}\.bun" } -$BunBin = mkdir -Force "${BunRoot}\bin" - -$Target = "bun-windows-x64" -$BaseURL = "https://github.com/oven-sh/bun/releases" -$URL = "$BaseURL/$(if ($Version -eq "latest") { "latest/download" } else { "download/$Version" })/$Target.zip" - -$ZipPath = "${BunBin}\$Target.zip" - -$DisplayVersion = $( - if ($Version -eq "latest") { "Bun" } - elseif ($Version -eq "canary") { "Bun Canary" } - elseif ($Version -match "^bun-v\d+\.\d+\.\d+$") { "Bun $($Version.Substring(4))" } - else { "Bun tag='${Version}'" } -) - -$null = mkdir -Force $BunBin -Remove-Item -Force $ZipPath -ErrorAction SilentlyContinue -curl.exe "-#SfLo" "$ZipPath" "$URL" -if ($LASTEXITCODE -ne 0) { - Write-Output "Install Failed - could not download $URL" - Write-Output "The command 'curl.exe $URL -o $ZipPath' exited with code ${LASTEXITCODE}`n" - exit 1 -} -if (!(Test-Path $ZipPath)) { - Write-Output "Install Failed - could not download $URL" - Write-Output "The file '$ZipPath' does not exist. Did an antivirus delete it?`n" - exit 1 -} -try { - $lastProgressPreference = $global:ProgressPreference - $global:ProgressPreference = 'SilentlyContinue'; - Expand-Archive "$ZipPath" "$BunBin" -Force - $global:ProgressPreference = $lastProgressPreference - if (!(Test-Path "${BunBin}\$Target\bun.exe")) { - throw "The file '${BunBin}\$Target\bun.exe' does not exist. Did an antivirus delete it?`n" + # filter out 32 bit and arm + if ($env:PROCESSOR_ARCHITECTURE -ne "AMD64") { + Write-Output "Install Failed:" + Write-Output "Bun for Windows is only available for x86 64-bit Windows.`n" + exit 1 } -} catch { - Write-Output "Install Failed - could not unzip $ZipPath" - Write-Error $_ - exit 1 -} -Move-Item "${BunBin}\$Target\bun.exe" "${BunBin}\bun.exe" -Force -Remove-Item "${BunBin}\$Target" -Recurse -Force -Remove-Item $ZipPath -Force - -$BunRevision = "$(& "${BunBin}\bun.exe" --revision)" -if ($LASTEXITCODE -ne 0) { - Write-Output "Install Failed - could not verify bun.exe" - Write-Output "The command '${BunBin}\bun.exe --revision' exited with code ${LASTEXITCODE}`n" - # TODO check for lastexitcode -1073741795 and print a better message - exit 1 -} -$DisplayVersion = if ($BunRevision -like "*-canary.*") { - "${BunRevision}" -} else { - "$(& "${BunBin}\bun.exe" --version)" -} - -$C_RESET = [char]27 + "[0m" -$C_GREEN = [char]27 + "[1;32m" - -try { - $null = New-Item -ItemType HardLink -Path "${BunBin}\bunx.exe" -Target "${BunBin}\bun.exe" -Force -} catch { - Write-Warning "Could not create a hard link for bunx, falling back to a cmd script`n" - Set-Content -Path "${BunBin}\bunx.cmd" -Value "@%~dp0bun.exe x %*" -} - -Write-Output "${C_GREEN}Bun ${DisplayVersion} was installed successfully!${C_RESET}" -Write-Output "The binary is located at ${BunBin}\bun.exe`n" - -Write-Warning "Bun for Windows is currently experimental.`nFor a more stable experience, please install Bun within WSL:`nhttps://bun.sh/docs/installation`n" - -$hasExistingOther = $false; -try { - $existing = Get-Command bun -ErrorAction - if ($existing.Source -ne "${BunBin}\bun.exe") { - Write-Warning "Note: Another bun.exe is already in %PATH% at $($existing.Source)`nTyping 'bun' in your terminal will not use what was just installed.`n" - $hasExistingOther = $true; + # if a semver is given, we need to adjust it to this format: bun-v0.0.0 + if ($Version -match "^\d+\.\d+\.\d+$") { + $Version = "bun-v$Version" + } + elseif ($Version -match "^v\d+\.\d+\.\d+$") { + $Version = "bun-$Version" + } + # todo: remove this when Bun for Windows is stable + elseif ($Version -eq "latest") { + $Version = "canary" } -} catch {} -$User = [System.EnvironmentVariableTarget]::User -$Path = [System.Environment]::GetEnvironmentVariable('Path', $User) -split ';' -if ($Path -notcontains $BunBin) { - $Path += $BunBin - [System.Environment]::SetEnvironmentVariable('Path', $Path -join ';', $User) -} -if ($env:PATH -notcontains ";${BunBin}") { - $env:PATH = "${env:Path};${BunBin}" -} + $Arch = "x64" + $IsBaseline = $ForceBaseline -if(!$hasExistingOther) { - if((Get-Command -ErrorAction SilentlyContinue bun) -eq $null) { - Write-Output "To get started, restart your terminal session, then type `"bun`"`n" + $EnabledXStateFeatures = ( ` + Add-Type -MemberDefinition '[DllImport("kernel32.dll")]public static extern long GetEnabledXStateFeatures();' ` + -Name 'Kernel32' -Namespace 'Win32' -PassThru ` + )::GetEnabledXStateFeatures(); + $IsBaseline = ($EnabledXStateFeatures -band 4) -neq 4; + + $BunRoot = if ($env:BUN_INSTALL) { $env:BUN_INSTALL } else { "${Home}\.bun" } + $BunBin = mkdir -Force "${BunRoot}\bin" + + $Target = "bun-windows-$Arch" + if ($IsBaseline) { + $Target = "bun-windows-$Arch-baseline" + } + $BaseURL = "https://github.com/oven-sh/bun/releases" + $URL = "$BaseURL/$(if ($Version -eq "latest") { "latest/download" } else { "download/$Version" })/$Target.zip" + + $ZipPath = "${BunBin}\$Target.zip" + + $DisplayVersion = $( + if ($Version -eq "latest") { "Bun" } + elseif ($Version -eq "canary") { "Bun Canary" } + elseif ($Version -match "^bun-v\d+\.\d+\.\d+$") { "Bun $($Version.Substring(4))" } + else { "Bun tag='${Version}'" } + ) + + $null = mkdir -Force $BunBin + Remove-Item -Force $ZipPath -ErrorAction SilentlyContinue + curl.exe "-#SfLo" "$ZipPath" "$URL" + if ($LASTEXITCODE -ne 0) { + Write-Output "Install Failed - could not download $URL" + Write-Output "The command 'curl.exe $URL -o $ZipPath' exited with code ${LASTEXITCODE}`n" + exit 1 + } + if (!(Test-Path $ZipPath)) { + Write-Output "Install Failed - could not download $URL" + Write-Output "The file '$ZipPath' does not exist. Did an antivirus delete it?`n" + exit 1 + } + + try { + $lastProgressPreference = $global:ProgressPreference + $global:ProgressPreference = 'SilentlyContinue'; + Expand-Archive "$ZipPath" "$BunBin" -Force + $global:ProgressPreference = $lastProgressPreference + if (!(Test-Path "${BunBin}\$Target\bun.exe")) { + throw "The file '${BunBin}\$Target\bun.exe' does not exist. Download is corrupt / Antivirus intercepted?`n" + } + } catch { + Write-Output "Install Failed - could not unzip $ZipPath" + Write-Error $_ + exit 1 + } + Move-Item "${BunBin}\$Target\bun.exe" "${BunBin}\bun.exe" -Force + + Remove-Item "${BunBin}\$Target" -Recurse -Force + Remove-Item $ZipPath -Force + + $BunRevision = "$(& "${BunBin}\bun.exe" --revision)" + if ($LASTEXITCODE -eq 1073741795) { # STATUS_ILLEGAL_INSTRUCTION + if ($IsBaseline) { + Write-Output "Install Failed - bun.exe (baseline) is not compatible with your CPU.`n" + Write-Output "Please open a GitHub issue with your CPU model:`nhttps://github.com/oven-sh/bun/issues/new/choose`n" + exit 1 + } + + Write-Output "Install Failed - bun.exe is not compatible with your CPU. This should have been detected before downloading.`n" + Write-Output "Attempting to download bun.exe (baseline) instead.`n" + + Install-Bun -Version $Version -ForceBaseline $True + exit 1 + } + if ($LASTEXITCODE -eq 3221225781) { # STATUS_DLL_NOT_FOUND + Write-Output "Install Failed - You are missing a DLL required to run bun.exe" + Write-Output "The command '${BunBin}\bun.exe --revision' exited with code ${LASTEXITCODE}`n" + exit 1 + } + if ($LASTEXITCODE -ne 0) { + Write-Output "Install Failed - could not verify bun.exe" + Write-Output "The command '${BunBin}\bun.exe --revision' exited with code ${LASTEXITCODE}`n" + exit 1 + } + $DisplayVersion = if ($BunRevision -like "*-canary.*") { + "${BunRevision}" } else { - Write-Output "Type `"bun`" in your terminal to get started`n" + "$(& "${BunBin}\bun.exe" --version)" } -} + + $C_RESET = [char]27 + "[0m" + $C_GREEN = [char]27 + "[1;32m" + + try { + $null = New-Item -ItemType HardLink -Path "${BunBin}\bunx.exe" -Target "${BunBin}\bun.exe" -Force + } catch { + Write-Warning "Could not create a hard link for bunx, falling back to a cmd script`n" + Set-Content -Path "${BunBin}\bunx.cmd" -Value "@%~dp0bun.exe x %*" + } + + Write-Output "${C_GREEN}Bun ${DisplayVersion} was installed successfully!${C_RESET}" + Write-Output "The binary is located at ${BunBin}\bun.exe`n" + + Write-Warning "Bun for Windows is currently experimental.`nFor a more stable experience, please install Bun within WSL:`nhttps://bun.sh/docs/installation`n" + + $hasExistingOther = $false; + try { + $existing = Get-Command bun -ErrorAction + if ($existing.Source -ne "${BunBin}\bun.exe") { + Write-Warning "Note: Another bun.exe is already in %PATH% at $($existing.Source)`nTyping 'bun' in your terminal will not use what was just installed.`n" + $hasExistingOther = $true; + } + } catch {} + + $User = [System.EnvironmentVariableTarget]::User + $Path = [System.Environment]::GetEnvironmentVariable('Path', $User) -split ';' + if ($Path -notcontains $BunBin) { + $Path += $BunBin + [System.Environment]::SetEnvironmentVariable('Path', $Path -join ';', $User) + } + if ($env:PATH -notcontains ";${BunBin}") { + $env:PATH = "${env:Path};${BunBin}" + } + + if(!$hasExistingOther) { + if((Get-Command -ErrorAction SilentlyContinue bun) -eq $null) { + Write-Output "To get started, restart your terminal session, then type `"bun`"`n" + } else { + Write-Output "Type `"bun`" in your terminal to get started`n" + } + } +} \ No newline at end of file diff --git a/src/cli/upgrade_command.zig b/src/cli/upgrade_command.zig index 14b5aa0697..ee92cd09eb 100644 --- a/src/cli/upgrade_command.zig +++ b/src/cli/upgrade_command.zig @@ -401,8 +401,8 @@ pub const UpgradeCommand = struct { const manual_upgrade_command = switch (Environment.os) { .linux, .mac => "curl -fsSL https://bun.sh/install | bash", - .windows => "TODO", - else => "TODO", + .windows => "powershell -c 'irm bun.sh/install.ps1|iex'", + else => "(TODO: Install script for " ++ Environment.os.displayString() ++ ")", }; pub fn exec(ctx: Command.Context) !void { diff --git a/src/js/node/child_process.js b/src/js/node/child_process.js index e4d5f81eb0..8fea09fcf7 100644 --- a/src/js/node/child_process.js +++ b/src/js/node/child_process.js @@ -20,15 +20,12 @@ var ArrayPrototypeMap = Array.prototype.map; var ArrayPrototypeIncludes = Array.prototype.includes; var ArrayPrototypeSlice = Array.prototype.slice; var ArrayPrototypeUnshift = Array.prototype.unshift; -var ArrayPrototypeLastIndexOf = Array.prototype.lastIndexOf; -var ArrayPrototypeSplice = Array.prototype.splice; var ArrayIsArray = Array.isArray; // var ArrayBuffer = ArrayBuffer; var ArrayBufferIsView = ArrayBuffer.isView; var NumberIsInteger = Number.isInteger; -var MathAbs = Math.abs; var StringPrototypeToUpperCase = String.prototype.toUpperCase; var StringPrototypeIncludes = String.prototype.includes; @@ -915,30 +912,32 @@ function normalizeSpawnArguments(file, args, options) { validateArgumentNullCheck(options.argv0, "options.argv0"); } - // TODO: Windows checks for Windows specific options + let { windowsVerbatimArguments } = options; + if (windowsVerbatimArguments != null) { + validateBoolean(windowsVerbatimArguments, "options.windowsVerbatimArguments"); + } // Handle shell if (options.shell) { validateArgumentNullCheck(options.shell, "options.shell"); const command = ArrayPrototypeJoin.$call([file, ...args], " "); - // TODO: Windows moment // Set the shell, switches, and commands. - // if (process.platform === "win32") { - // if (typeof options.shell === "string") file = options.shell; - // else file = process.env.comspec || "cmd.exe"; - // // '/d /s /c' is used only for cmd.exe. - // if (RegExpPrototypeExec(/^(?:.*\\)?cmd(?:\.exe)?$/i, file) !== null) { - // args = ["/d", "/s", "/c", `"${command}"`]; - // windowsVerbatimArguments = true; - // } else { - // args = ["-c", command]; - // } - // } else { - if (typeof options.shell === "string") file = options.shell; - else if (process.platform === "android") file = "sh"; - else file = "sh"; - args = ["-c", command]; - // } + if (process.platform === "win32") { + if (typeof options.shell === "string") file = options.shell; + else file = process.env.comspec || "cmd.exe"; + // '/d /s /c' is used only for cmd.exe. + if (/^(?:.*\\)?cmd(?:\.exe)?$/i.exec(file) !== null) { + args = ["/d", "/s", "/c", `"${command}"`]; + windowsVerbatimArguments = true; + } else { + args = ["-c", command]; + } + } else { + if (typeof options.shell === "string") file = options.shell; + else if (process.platform === "android") file = "sh"; + else file = "sh"; + args = ["-c", command]; + } } // Handle argv0 diff --git a/src/report.zig b/src/report.zig index 41cd74af69..7ca553ac72 100644 --- a/src/report.zig +++ b/src/report.zig @@ -245,7 +245,12 @@ pub fn fatal(err_: ?anyerror, msg_: ?string) void { } if (!had_printed_fatal) { - crash_report_writer.print("\nSearch GitHub issues https://bun.sh/issues or ask for #help in https://bun.sh/discord\n\n", .{}); + if (Environment.isWindows) { + // TODO(@paperdave) change this to the original one once bun windows is stable + crash_report_writer.print("\nSearch GitHub issues https://bun.sh/issues or join in #windows channel in https://bun.sh/discord\n\n", .{}); + } else { + crash_report_writer.print("\nSearch GitHub issues https://bun.sh/issues or ask for #help in https://bun.sh/discord\n\n", .{}); + } crash_report_writer.flush(); } } diff --git a/test/bun.lockb b/test/bun.lockb index 051506d8de..d166b9b608 100755 Binary files a/test/bun.lockb and b/test/bun.lockb differ diff --git a/test/bundler/bun-build-api.test.ts b/test/bundler/bun-build-api.test.ts index 5293d15183..14a657ceba 100644 --- a/test/bundler/bun-build-api.test.ts +++ b/test/bundler/bun-build-api.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { test, expect, describe } from "bun:test"; import { readFileSync } from "fs"; import { bunEnv, bunExe } from "harness"; diff --git a/test/bundler/bundler_browser.test.ts b/test/bundler/bundler_browser.test.ts index c14e338f90..44baaaeeaf 100644 --- a/test/bundler/bundler_browser.test.ts +++ b/test/bundler/bundler_browser.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import assert from "assert"; import dedent from "dedent"; import { itBundled, testForFile } from "./expectBundled"; diff --git a/test/bundler/bundler_cjs2esm.test.ts b/test/bundler/bundler_cjs2esm.test.ts index 01a17356b6..5b34a27f8f 100644 --- a/test/bundler/bundler_cjs2esm.test.ts +++ b/test/bundler/bundler_cjs2esm.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: panic "TODO on Windows" import assert from "assert"; import dedent from "dedent"; import { itBundled, testForFile } from "./expectBundled"; diff --git a/test/bundler/bundler_compile.test.ts b/test/bundler/bundler_compile.test.ts index 13198747f0..85fb8b0c76 100644 --- a/test/bundler/bundler_compile.test.ts +++ b/test/bundler/bundler_compile.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: panic "TODO on Windows" import assert from "assert"; import dedent from "dedent"; import { ESBUILD, itBundled, testForFile } from "./expectBundled"; diff --git a/test/bundler/bundler_decorator_metadata.test.ts b/test/bundler/bundler_decorator_metadata.test.ts index 60c11f703a..313abb0f0f 100644 --- a/test/bundler/bundler_decorator_metadata.test.ts +++ b/test/bundler/bundler_decorator_metadata.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: panic "TODO on Windows" import assert from "assert"; import { itBundled, testForFile } from "./expectBundled"; var { describe, test, expect } = testForFile(import.meta.path); diff --git a/test/bundler/bundler_edgecase.test.ts b/test/bundler/bundler_edgecase.test.ts index 59c0137828..ff02e29b9c 100644 --- a/test/bundler/bundler_edgecase.test.ts +++ b/test/bundler/bundler_edgecase.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: panic "TODO on Windows" import assert from "assert"; import dedent from "dedent"; import { itBundled, testForFile } from "./expectBundled"; diff --git a/test/bundler/bundler_jsx.test.ts b/test/bundler/bundler_jsx.test.ts index 5288701d66..3286cc83f9 100644 --- a/test/bundler/bundler_jsx.test.ts +++ b/test/bundler/bundler_jsx.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import assert from "assert"; import dedent from "dedent"; import { BundlerTestInput, itBundled, testForFile } from "./expectBundled"; diff --git a/test/bundler/bundler_minify.test.ts b/test/bundler/bundler_minify.test.ts index 7e1c7ec12b..0d6ff4b72b 100644 --- a/test/bundler/bundler_minify.test.ts +++ b/test/bundler/bundler_minify.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: panic "TODO on Windows" import assert from "assert"; import { itBundled, testForFile } from "./expectBundled"; var { describe, test, expect } = testForFile(import.meta.path); diff --git a/test/bundler/bundler_naming.test.ts b/test/bundler/bundler_naming.test.ts index 92f3d4f9a3..5bdc1fbce4 100644 --- a/test/bundler/bundler_naming.test.ts +++ b/test/bundler/bundler_naming.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: panic "TODO on Windows" import assert from "assert"; import dedent from "dedent"; import { ESBUILD, itBundled, testForFile } from "./expectBundled"; diff --git a/test/bundler/bundler_npm.test.ts b/test/bundler/bundler_npm.test.ts index 327d680878..581b2442fc 100644 --- a/test/bundler/bundler_npm.test.ts +++ b/test/bundler/bundler_npm.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: panic "TODO on Windows" import assert from "assert"; import dedent from "dedent"; import { ESBUILD, itBundled, testForFile } from "./expectBundled"; diff --git a/test/bundler/bundler_plugin.test.ts b/test/bundler/bundler_plugin.test.ts index f8e5d8d591..f461bba077 100644 --- a/test/bundler/bundler_plugin.test.ts +++ b/test/bundler/bundler_plugin.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import assert from "assert"; import dedent from "dedent"; import path from "path"; diff --git a/test/bundler/bundler_regressions.test.ts b/test/bundler/bundler_regressions.test.ts index 9492e0d5cb..df57473462 100644 --- a/test/bundler/bundler_regressions.test.ts +++ b/test/bundler/bundler_regressions.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: panic "TODO on Windows" import assert from "assert"; import dedent from "dedent"; import { itBundled, testForFile } from "./expectBundled"; diff --git a/test/bundler/bundler_string.test.ts b/test/bundler/bundler_string.test.ts index 45faaee3e1..1537d7d98d 100644 --- a/test/bundler/bundler_string.test.ts +++ b/test/bundler/bundler_string.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import assert from "assert"; import dedent from "dedent"; import { itBundled, testForFile } from "./expectBundled"; diff --git a/test/bundler/cli.test.ts b/test/bundler/cli.test.ts index 9cec7ad57f..d574ceab42 100644 --- a/test/bundler/cli.test.ts +++ b/test/bundler/cli.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { bunEnv, bunExe } from "harness"; import { describe, expect, test } from "bun:test"; import fs from "node:fs"; diff --git a/test/bundler/esbuild/dce.test.ts b/test/bundler/esbuild/dce.test.ts index 618eb5d281..1ddd35195d 100644 --- a/test/bundler/esbuild/dce.test.ts +++ b/test/bundler/esbuild/dce.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: panic "TODO on Windows" import assert from "assert"; import dedent from "dedent"; import { ESBUILD, itBundled, testForFile } from "../expectBundled"; diff --git a/test/bundler/esbuild/default.test.ts b/test/bundler/esbuild/default.test.ts index 5f131a151b..2864ffb1bc 100644 --- a/test/bundler/esbuild/default.test.ts +++ b/test/bundler/esbuild/default.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import assert from "assert"; import dedent from "dedent"; diff --git a/test/bundler/esbuild/extra.test.ts b/test/bundler/esbuild/extra.test.ts index f96f348501..5b521abb08 100644 --- a/test/bundler/esbuild/extra.test.ts +++ b/test/bundler/esbuild/extra.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import assert from "assert"; import dedent from "dedent"; import { itBundled, testForFile } from "../expectBundled"; diff --git a/test/bundler/esbuild/importstar.test.ts b/test/bundler/esbuild/importstar.test.ts index cabe81a4b1..4b49a68da0 100644 --- a/test/bundler/esbuild/importstar.test.ts +++ b/test/bundler/esbuild/importstar.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: panic "TODO on Windows" import assert from "assert"; import { itBundled, testForFile } from "../expectBundled"; var { describe, test, expect } = testForFile(import.meta.path); diff --git a/test/bundler/esbuild/importstar_ts.test.ts b/test/bundler/esbuild/importstar_ts.test.ts index 45ae1cbb3e..96d37e7045 100644 --- a/test/bundler/esbuild/importstar_ts.test.ts +++ b/test/bundler/esbuild/importstar_ts.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: panic "TODO on Windows" import assert from "assert"; import { itBundled, testForFile } from "../expectBundled"; var { describe, test, expect } = testForFile(import.meta.path); diff --git a/test/bundler/esbuild/loader.test.ts b/test/bundler/esbuild/loader.test.ts index c76fdd18ac..380f74eda3 100644 --- a/test/bundler/esbuild/loader.test.ts +++ b/test/bundler/esbuild/loader.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: panic "TODO on Windows" import fs from "fs"; import { itBundled, testForFile } from "../expectBundled"; var { describe, test, expect } = testForFile(import.meta.path); diff --git a/test/bundler/esbuild/packagejson.test.ts b/test/bundler/esbuild/packagejson.test.ts index 5d459b968a..8fed430d38 100644 --- a/test/bundler/esbuild/packagejson.test.ts +++ b/test/bundler/esbuild/packagejson.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: panic "TODO on Windows" import { itBundled, testForFile } from "../expectBundled"; var { describe, test, expect } = testForFile(import.meta.path); diff --git a/test/bundler/esbuild/splitting.test.ts b/test/bundler/esbuild/splitting.test.ts index fbf5634fe7..0a7907ae5d 100644 --- a/test/bundler/esbuild/splitting.test.ts +++ b/test/bundler/esbuild/splitting.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: panic "TODO on Windows" import assert from "assert"; import { readdirSync } from "fs"; import { itBundled, testForFile } from "../expectBundled"; diff --git a/test/bundler/esbuild/ts.test.ts b/test/bundler/esbuild/ts.test.ts index 576ee76331..7d5fd8c1a8 100644 --- a/test/bundler/esbuild/ts.test.ts +++ b/test/bundler/esbuild/ts.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: panic "TODO on Windows" import assert from "assert"; import { itBundled, testForFile } from "../expectBundled"; var { describe, test, expect } = testForFile(import.meta.path); diff --git a/test/bundler/esbuild/tsconfig.test.ts b/test/bundler/esbuild/tsconfig.test.ts index b09a0d2814..84b7a641f4 100644 --- a/test/bundler/esbuild/tsconfig.test.ts +++ b/test/bundler/esbuild/tsconfig.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: panic "TODO on Windows" import { itBundled, testForFile } from "../expectBundled"; var { describe, test, expect } = testForFile(import.meta.path); diff --git a/test/cli/bun.test.ts b/test/cli/bun.test.ts index 9b48eeba3e..b45d1331c6 100644 --- a/test/cli/bun.test.ts +++ b/test/cli/bun.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, test, expect } from "bun:test"; import { spawnSync } from "bun"; import { bunEnv, bunExe } from "harness"; diff --git a/test/cli/hot/hot.test.ts b/test/cli/hot/hot.test.ts index 36ecd319e3..facffa042b 100644 --- a/test/cli/hot/hot.test.ts +++ b/test/cli/hot/hot.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { spawn } from "bun"; import { expect, it } from "bun:test"; import { bunExe, bunEnv, tempDirWithFiles, bunRun, bunRunAsScript } from "harness"; diff --git a/test/cli/init/init.test.ts b/test/cli/init/init.test.ts index d876b97d16..81d9b746b1 100644 --- a/test/cli/init/init.test.ts +++ b/test/cli/init/init.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import fs from "fs"; import path from "path"; import os from "os"; diff --git a/test/cli/install/bad-workspace.test.ts b/test/cli/install/bad-workspace.test.ts index 0c72c2fd23..410012b159 100644 --- a/test/cli/install/bad-workspace.test.ts +++ b/test/cli/install/bad-workspace.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { spawnSync } from "bun"; import { afterEach, beforeEach, expect, test } from "bun:test"; import { mkdtempSync, realpathSync, rmSync, writeFileSync } from "fs"; diff --git a/test/cli/install/bun-add.test.ts b/test/cli/install/bun-add.test.ts index eda5a0a280..8a06af8dba 100644 --- a/test/cli/install/bun-add.test.ts +++ b/test/cli/install/bun-add.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { file, spawn } from "bun"; import { afterAll, afterEach, beforeAll, beforeEach, expect, it } from "bun:test"; import { bunExe, bunEnv as env } from "harness"; diff --git a/test/cli/install/bun-create.test.ts b/test/cli/install/bun-create.test.ts index 97ecb89714..50783d8c18 100644 --- a/test/cli/install/bun-create.test.ts +++ b/test/cli/install/bun-create.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { spawn, spawnSync } from "bun"; import { afterEach, beforeEach, expect, it, describe } from "bun:test"; import { bunExe, bunEnv as env } from "harness"; diff --git a/test/cli/install/bun-install-pathname-trailing-slash.test.ts b/test/cli/install/bun-install-pathname-trailing-slash.test.ts index fc62a3822a..3896419796 100644 --- a/test/cli/install/bun-install-pathname-trailing-slash.test.ts +++ b/test/cli/install/bun-install-pathname-trailing-slash.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { afterEach, beforeEach, expect, test } from "bun:test"; import { mkdtempSync, realpathSync, rmSync } from "fs"; import { bunEnv, bunExe } from "harness"; diff --git a/test/cli/install/bun-install.test.ts b/test/cli/install/bun-install.test.ts index 084327c582..b4b52f29b5 100644 --- a/test/cli/install/bun-install.test.ts +++ b/test/cli/install/bun-install.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { file, listen, Socket, spawn } from "bun"; import { afterAll, afterEach, beforeAll, beforeEach, expect, it, describe, test } from "bun:test"; import { bunExe, bunEnv as env } from "harness"; @@ -7816,43 +7817,47 @@ describe("Registry URLs", () => { const regURL = entry[0]; const fails = entry[1]; - it(`should ${fails ? "fail" : "handle"} joining registry and package URLs (${regURL})`, async () => { - await writeFile(join(package_dir, "bunfig.toml"), `[install]\ncache = false\nregistry = "${regURL}"`); + it( + `should ${fails ? "fail" : "handle"} joining registry and package URLs (${regURL})`, + async () => { + await writeFile(join(package_dir, "bunfig.toml"), `[install]\ncache = false\nregistry = "${regURL}"`); - await writeFile( - join(package_dir, "package.json"), - JSON.stringify({ - name: "foo", - version: "0.0.1", - dependencies: { - notapackage: "0.0.2", - }, - }), - ); + await writeFile( + join(package_dir, "package.json"), + JSON.stringify({ + name: "foo", + version: "0.0.1", + dependencies: { + notapackage: "0.0.2", + }, + }), + ); - const { stdout, stderr, exited } = spawn({ - cmd: [bunExe(), "install"], - cwd: package_dir, - stdout: null, - stdin: "pipe", - stderr: "pipe", - env, - }); - expect(stdout).toBeDefined(); - expect(await new Response(stdout).text()).toBeEmpty(); + const { stdout, stderr, exited } = spawn({ + cmd: [bunExe(), "install"], + cwd: package_dir, + stdout: null, + stdin: "pipe", + stderr: "pipe", + env, + }); + expect(stdout).toBeDefined(); + expect(await new Response(stdout).text()).toBeEmpty(); - expect(stderr).toBeDefined(); - const err = await new Response(stderr).text(); + expect(stderr).toBeDefined(); + const err = await new Response(stderr).text(); - if (fails) { - expect(err).toContain(`Failed to join registry "${regURL}" and package "notapackage" URLs`); - expect(err).toContain("error: InvalidURL"); - } else { - expect(err).toContain("error: notapackage@0.0.2 failed to resolve"); - } - // fails either way, since notapackage is, well, not a real package. - expect(await exited).not.toBe(0); - }); + if (fails) { + expect(err).toContain(`Failed to join registry "${regURL}" and package "notapackage" URLs`); + expect(err).toContain("error: InvalidURL"); + } else { + expect(err).toContain("error: notapackage@0.0.2 failed to resolve"); + } + // fails either way, since notapackage is, well, not a real package. + expect(await exited).not.toBe(0); + }, + Infinity, + ); } it("shouldn't fail joining invalid registry and package URLs for optional dependencies", async () => { diff --git a/test/cli/install/bun-link.test.ts b/test/cli/install/bun-link.test.ts index a8731eb4e7..ab4cdd7026 100644 --- a/test/cli/install/bun-link.test.ts +++ b/test/cli/install/bun-link.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { spawn, file } from "bun"; import { afterAll, afterEach, beforeAll, beforeEach, expect, it } from "bun:test"; import { bunExe, bunEnv as env } from "harness"; diff --git a/test/cli/install/bun-pm.test.ts b/test/cli/install/bun-pm.test.ts index 06ffb4c450..8703f780c8 100644 --- a/test/cli/install/bun-pm.test.ts +++ b/test/cli/install/bun-pm.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { hash, spawn } from "bun"; import { afterAll, afterEach, beforeAll, beforeEach, expect, it } from "bun:test"; import { bunEnv, bunExe, bunEnv as env } from "harness"; diff --git a/test/cli/install/bun-remove.test.ts b/test/cli/install/bun-remove.test.ts index 693909da5f..d7da58860c 100644 --- a/test/cli/install/bun-remove.test.ts +++ b/test/cli/install/bun-remove.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { bunExe, bunEnv as env } from "harness"; import { mkdir, mkdtemp, realpath, rm, writeFile } from "fs/promises"; import { join, relative } from "path"; diff --git a/test/cli/install/bun-run.test.ts b/test/cli/install/bun-run.test.ts index e01c995324..33b4265c32 100644 --- a/test/cli/install/bun-run.test.ts +++ b/test/cli/install/bun-run.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { file, spawn, spawnSync } from "bun"; import { afterEach, beforeEach, expect, it, describe } from "bun:test"; import { bunEnv, bunExe, bunEnv as env } from "harness"; diff --git a/test/cli/install/bun-update.test.ts b/test/cli/install/bun-update.test.ts index bb7fd15e37..d089ae7ac0 100644 --- a/test/cli/install/bun-update.test.ts +++ b/test/cli/install/bun-update.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { file, listen, Socket, spawn } from "bun"; import { afterAll, afterEach, beforeAll, beforeEach, expect, it } from "bun:test"; import { bunExe, bunEnv as env } from "harness"; diff --git a/test/cli/install/bunx.test.ts b/test/cli/install/bunx.test.ts index a52965ea90..e7bbb8a99a 100644 --- a/test/cli/install/bunx.test.ts +++ b/test/cli/install/bunx.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { spawn } from "bun"; import { afterEach, beforeEach, expect, it } from "bun:test"; import { bunExe, bunEnv as env } from "harness"; diff --git a/test/cli/install/migration/complex-workspace.test.ts b/test/cli/install/migration/complex-workspace.test.ts index a860d142e5..89c712d81f 100644 --- a/test/cli/install/migration/complex-workspace.test.ts +++ b/test/cli/install/migration/complex-workspace.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import fs from "fs"; import path from "path"; import { test, expect, describe, beforeAll } from "bun:test"; diff --git a/test/cli/install/migration/migrate.test.ts b/test/cli/install/migration/migrate.test.ts index 5af930d5dc..bd5c9f2795 100644 --- a/test/cli/install/migration/migrate.test.ts +++ b/test/cli/install/migration/migrate.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import fs from "fs"; import { test, expect, beforeAll, afterAll } from "bun:test"; import { bunEnv, bunExe } from "harness"; diff --git a/test/cli/install/overrides.test.ts b/test/cli/install/overrides.test.ts index db617d8393..5961f1206f 100644 --- a/test/cli/install/overrides.test.ts +++ b/test/cli/install/overrides.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { mkdtempSync } from "fs"; import { join } from "path"; import { tmpdir } from "os"; diff --git a/test/cli/install/registry/bun-install-registry.test.ts b/test/cli/install/registry/bun-install-registry.test.ts index 49aaae269c..31e8ebb452 100644 --- a/test/cli/install/registry/bun-install-registry.test.ts +++ b/test/cli/install/registry/bun-install-registry.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { file, spawn } from "bun"; import { bunExe, bunEnv as env } from "harness"; import { join } from "path"; diff --git a/test/cli/run/as-node.test.ts b/test/cli/run/as-node.test.ts index 6cc2b0d544..ccc4bd08d9 100644 --- a/test/cli/run/as-node.test.ts +++ b/test/cli/run/as-node.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, test, expect } from "bun:test"; import { bunExe, fakeNodeRun, tempDirWithFiles } from "../../harness"; import { join } from "path"; diff --git a/test/cli/run/commonjs-no-export.test.ts b/test/cli/run/commonjs-no-export.test.ts index b0bedd9d63..ca49221acd 100644 --- a/test/cli/run/commonjs-no-export.test.ts +++ b/test/cli/run/commonjs-no-export.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { test, expect } from "bun:test"; import { bunEnv, bunExe } from "harness"; import { join } from "path"; diff --git a/test/cli/run/empty-file.test.ts b/test/cli/run/empty-file.test.ts index f29162bf7a..d6c68b7f01 100644 --- a/test/cli/run/empty-file.test.ts +++ b/test/cli/run/empty-file.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { it, expect } from "bun:test"; import { bunEnv, bunExe } from "harness"; import { join } from "path"; diff --git a/test/cli/run/env.test.ts b/test/cli/run/env.test.ts index 368e58a82c..9ab8abb609 100644 --- a/test/cli/run/env.test.ts +++ b/test/cli/run/env.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, expect, test, beforeAll, afterAll } from "bun:test"; import { bunRun, bunRunAsScript, bunTest, tempDirWithFiles, bunExe, bunEnv } from "harness"; import path from "path"; diff --git a/test/cli/run/if-present.test.ts b/test/cli/run/if-present.test.ts index 96e587dc6d..f5eeff64e2 100644 --- a/test/cli/run/if-present.test.ts +++ b/test/cli/run/if-present.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, test, expect, beforeAll } from "bun:test"; import { spawnSync } from "bun"; import { bunEnv, bunExe, tempDirWithFiles } from "harness"; diff --git a/test/cli/run/log-test.test.ts b/test/cli/run/log-test.test.ts index eb15dd5929..acb5293fc9 100644 --- a/test/cli/run/log-test.test.ts +++ b/test/cli/run/log-test.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { it, expect } from "bun:test"; import { basename, dirname, join } from "path"; import * as fs from "fs"; diff --git a/test/cli/run/preload-test.test.js b/test/cli/run/preload-test.test.js index 3fa73956c9..cbb88d8385 100644 --- a/test/cli/run/preload-test.test.js +++ b/test/cli/run/preload-test.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { spawnSync } from "bun"; import { describe, expect, test } from "bun:test"; import { mkdirSync, realpathSync } from "fs"; diff --git a/test/cli/run/require-cache.test.ts b/test/cli/run/require-cache.test.ts index e55502b9be..aae4b4158f 100644 --- a/test/cli/run/require-cache.test.ts +++ b/test/cli/run/require-cache.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { test, expect, describe } from "bun:test"; import { bunEnv, bunExe } from "harness"; import { join } from "path"; diff --git a/test/cli/run/run-cjs.test.ts b/test/cli/run/run-cjs.test.ts index 4c0d370025..1abf702970 100644 --- a/test/cli/run/run-cjs.test.ts +++ b/test/cli/run/run-cjs.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { expect, test } from "bun:test"; import { mkdirSync, realpathSync } from "fs"; import { bunEnv, bunExe } from "harness"; diff --git a/test/cli/run/run-eval.test.ts b/test/cli/run/run-eval.test.ts index 3ddcd27070..40de4b1e8a 100644 --- a/test/cli/run/run-eval.test.ts +++ b/test/cli/run/run-eval.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, expect, test } from "bun:test"; import { mkdirSync, realpathSync } from "fs"; import { bunEnv, bunExe } from "harness"; diff --git a/test/cli/run/run-extensionless.test.ts b/test/cli/run/run-extensionless.test.ts index 642c274d9f..2f14fc4d57 100644 --- a/test/cli/run/run-extensionless.test.ts +++ b/test/cli/run/run-extensionless.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { expect, test } from "bun:test"; import { mkdirSync, realpathSync } from "fs"; import { bunEnv, bunExe } from "harness"; diff --git a/test/cli/run/run-process-env.test.ts b/test/cli/run/run-process-env.test.ts index 8303fe19cc..af4f86b541 100644 --- a/test/cli/run/run-process-env.test.ts +++ b/test/cli/run/run-process-env.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, expect, test } from "bun:test"; import { bunExe, bunRunAsScript, tempDirWithFiles } from "harness"; diff --git a/test/cli/run/run-quote.test.ts b/test/cli/run/run-quote.test.ts index a6dffbd6a7..80437d2f1b 100644 --- a/test/cli/run/run-quote.test.ts +++ b/test/cli/run/run-quote.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { expect, it } from "bun:test"; import { bunRunAsScript, tempDirWithFiles } from "harness"; diff --git a/test/cli/run/run-unicode.test.ts b/test/cli/run/run-unicode.test.ts index c1a9c24668..d86246beb5 100644 --- a/test/cli/run/run-unicode.test.ts +++ b/test/cli/run/run-unicode.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { expect, test } from "bun:test"; import { mkdirSync, realpathSync } from "fs"; import { bunEnv, bunExe } from "harness"; diff --git a/test/cli/run/run_command.test.ts b/test/cli/run/run_command.test.ts index 4be12784bd..0c1f71e57d 100644 --- a/test/cli/run/run_command.test.ts +++ b/test/cli/run/run_command.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, test, expect } from "bun:test"; import { spawnSync } from "bun"; import { bunEnv, bunExe } from "harness"; diff --git a/test/cli/run/transpiler-cache.test.ts b/test/cli/run/transpiler-cache.test.ts index 2ce052cdfb..cc4a915912 100644 --- a/test/cli/run/transpiler-cache.test.ts +++ b/test/cli/run/transpiler-cache.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import assert from "assert"; import { Subprocess } from "bun"; import { beforeEach, describe, expect, test } from "bun:test"; diff --git a/test/cli/test/bun-test.test.ts b/test/cli/test/bun-test.test.ts index 1ae8d3557c..0c28800280 100644 --- a/test/cli/test/bun-test.test.ts +++ b/test/cli/test/bun-test.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { join, resolve, dirname } from "node:path"; import { tmpdir } from "node:os"; import { mkdtempSync, writeFileSync, rmSync, mkdirSync } from "node:fs"; diff --git a/test/integration/esbuild/esbuild.test.ts b/test/integration/esbuild/esbuild.test.ts index 097deef2d0..5bb827e9aa 100644 --- a/test/integration/esbuild/esbuild.test.ts +++ b/test/integration/esbuild/esbuild.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, expect, test } from "bun:test"; import { rm, writeFile, mkdir, exists, cp } from "fs/promises"; import { bunExe, bunEnv as env } from "harness"; diff --git a/test/integration/next/default-pages-dir/bun.lockb b/test/integration/next/default-pages-dir/bun.lockb index 4c97b03982..17d2db17c4 100755 Binary files a/test/integration/next/default-pages-dir/bun.lockb and b/test/integration/next/default-pages-dir/bun.lockb differ diff --git a/test/integration/next/default-pages-dir/test/dev-server.test.ts b/test/integration/next/default-pages-dir/test/dev-server.test.ts index 293357d449..2ff57ef626 100644 --- a/test/integration/next/default-pages-dir/test/dev-server.test.ts +++ b/test/integration/next/default-pages-dir/test/dev-server.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { afterAll, beforeAll, describe, expect, test } from "bun:test"; import { bunEnv, bunExe } from "../../../../harness"; import { Subprocess } from "bun"; diff --git a/test/integration/next/default-pages-dir/test/next-build.test.ts b/test/integration/next/default-pages-dir/test/next-build.test.ts index e108a716e9..feb1029a71 100644 --- a/test/integration/next/default-pages-dir/test/next-build.test.ts +++ b/test/integration/next/default-pages-dir/test/next-build.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { afterAll, beforeAll, describe, expect, test } from "bun:test"; import { bunEnv, bunExe } from "../../../../harness"; import { diff --git a/test/integration/sharp/sharp.test.ts b/test/integration/sharp/sharp.test.ts index 9c70cffc81..291d4f4c7e 100644 --- a/test/integration/sharp/sharp.test.ts +++ b/test/integration/sharp/sharp.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, expect, it } from "bun:test"; import path from "path"; import sharp from "sharp"; diff --git a/test/internal/package-json-lint.test.ts b/test/internal/package-json-lint.test.ts index 5a1fae5f98..ee4e01e625 100644 --- a/test/internal/package-json-lint.test.ts +++ b/test/internal/package-json-lint.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { test, expect, describe } from "bun:test"; import { join } from "path"; import { readdirSync, existsSync } from "fs"; diff --git a/test/js/bun/console/console-iterator.test.ts b/test/js/bun/console/console-iterator.test.ts index 6c10625440..ba20d74bda 100644 --- a/test/js/bun/console/console-iterator.test.ts +++ b/test/js/bun/console/console-iterator.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { spawnSync, spawn } from "bun"; import { describe, expect, it } from "bun:test"; import { bunExe } from "harness"; diff --git a/test/js/bun/console/console-table.test.ts b/test/js/bun/console/console-table.test.ts index 910b7191d2..208d55893d 100644 --- a/test/js/bun/console/console-table.test.ts +++ b/test/js/bun/console/console-table.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, expect, test } from "bun:test"; import { spawnSync } from "bun"; import { bunExe, bunEnv } from "harness"; diff --git a/test/js/bun/dns/resolve-dns.test.ts b/test/js/bun/dns/resolve-dns.test.ts index 57b3a50c7d..e91dbe3f45 100644 --- a/test/js/bun/dns/resolve-dns.test.ts +++ b/test/js/bun/dns/resolve-dns.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { dns } from "bun"; import { describe, expect, it, test } from "bun:test"; import { withoutAggressiveGC } from "harness"; diff --git a/test/js/bun/ffi/ffi.test.fixture.callback.c b/test/js/bun/ffi/ffi.test.fixture.callback.c index 32336556e9..1b04ffcc0f 100644 --- a/test/js/bun/ffi/ffi.test.fixture.callback.c +++ b/test/js/bun/ffi/ffi.test.fixture.callback.c @@ -296,9 +296,6 @@ ZIG_REPR_TYPE JSFunctionCall(void* jsGlobalObject, void* callFrame); bool my_callback_function(void* arg0); bool my_callback_function(void* arg0) { -#ifdef INJECT_BEFORE -INJECT_BEFORE; -#endif ZIG_REPR_TYPE arguments[1]; arguments[0] = PTR_TO_JSVALUE(arg0).asZigRepr; return (bool)JSVALUE_TO_BOOL(_FFI_Callback_call((void*)0x0000000000000000ULL, 1, arguments)); diff --git a/test/js/bun/ffi/ffi.test.js b/test/js/bun/ffi/ffi.test.js index 92cfb6d9e8..7fce41a1e9 100644 --- a/test/js/bun/ffi/ffi.test.js +++ b/test/js/bun/ffi/ffi.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { afterAll, describe, expect, it } from "bun:test"; import { existsSync } from "fs"; import { platform } from "os"; diff --git a/test/js/bun/glob/leak.test.ts b/test/js/bun/glob/leak.test.ts index f1fbc92b06..f4b9cd9e6f 100644 --- a/test/js/bun/glob/leak.test.ts +++ b/test/js/bun/glob/leak.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { expect, test, describe, beforeAll, afterAll } from "bun:test"; import { Glob, GlobScanOptions } from "bun"; diff --git a/test/js/bun/glob/scan.test.ts b/test/js/bun/glob/scan.test.ts index 50986795e7..27147be7be 100644 --- a/test/js/bun/glob/scan.test.ts +++ b/test/js/bun/glob/scan.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing // Portions of this file are derived from works under the MIT License: // // Copyright (c) Denis Malinochkin diff --git a/test/js/bun/glob/stress.test.ts b/test/js/bun/glob/stress.test.ts index 43be74444f..fdacd3d860 100644 --- a/test/js/bun/glob/stress.test.ts +++ b/test/js/bun/glob/stress.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { expect, test, describe, beforeAll } from "bun:test"; import { Glob } from "bun"; import { tempFixturesDir } from "./util"; diff --git a/test/js/bun/globals.test.js b/test/js/bun/globals.test.js index 63927b2b19..b7668ebc84 100644 --- a/test/js/bun/globals.test.js +++ b/test/js/bun/globals.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { expect, it, describe } from "bun:test"; import { bunEnv, bunExe } from "harness"; import path from "path"; diff --git a/test/js/bun/http/bun-server.test.ts b/test/js/bun/http/bun-server.test.ts index f32dd659d0..2e602e5bb0 100644 --- a/test/js/bun/http/bun-server.test.ts +++ b/test/js/bun/http/bun-server.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, expect, test } from "bun:test"; import { bunExe, bunEnv } from "harness"; import path from "path"; diff --git a/test/js/bun/http/fetch-file-upload.test.ts b/test/js/bun/http/fetch-file-upload.test.ts index f79bd5526c..3fa6a5cc58 100644 --- a/test/js/bun/http/fetch-file-upload.test.ts +++ b/test/js/bun/http/fetch-file-upload.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { expect, test, describe } from "bun:test"; import { withoutAggressiveGC } from "harness"; import { tmpdir } from "os"; diff --git a/test/js/bun/http/proxy.test.js b/test/js/bun/http/proxy.test.js index 433adfb831..864a9c6816 100644 --- a/test/js/bun/http/proxy.test.js +++ b/test/js/bun/http/proxy.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { afterAll, beforeAll, describe, expect, it } from "bun:test"; import { gc } from "harness"; import fs from "fs"; diff --git a/test/js/bun/http/serve-listen.test.ts b/test/js/bun/http/serve-listen.test.ts index 7ffad3e2e8..dd355b54ff 100644 --- a/test/js/bun/http/serve-listen.test.ts +++ b/test/js/bun/http/serve-listen.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, test, expect } from "bun:test"; import { file, serve } from "bun"; import type { NetworkInterfaceInfo } from "node:os"; diff --git a/test/js/bun/http/serve.test.ts b/test/js/bun/http/serve.test.ts index 70e5dbe735..47697c7c3e 100644 --- a/test/js/bun/http/serve.test.ts +++ b/test/js/bun/http/serve.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { file, gc, Serve, serve, Server } from "bun"; import { afterEach, describe, it, expect, afterAll } from "bun:test"; import { readFileSync, writeFileSync } from "fs"; diff --git a/test/js/bun/io/bun-write.test.js b/test/js/bun/io/bun-write.test.js index 5603e82130..18583f089f 100644 --- a/test/js/bun/io/bun-write.test.js +++ b/test/js/bun/io/bun-write.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import fs, { mkdirSync } from "fs"; import { it, expect, describe } from "bun:test"; import path, { join } from "path"; diff --git a/test/js/bun/jsc/bun-jsc.test.ts b/test/js/bun/jsc/bun-jsc.test.ts index e993dd723b..5da25c5bc9 100644 --- a/test/js/bun/jsc/bun-jsc.test.ts +++ b/test/js/bun/jsc/bun-jsc.test.ts @@ -86,7 +86,8 @@ describe("bun:jsc", () => { expect(optimizeNextInvocation(count)).toBeUndefined(); count(); }); - it("numberOfDFGCompiles", () => { + it("numberOfDFGCompiles", async () => { + await Bun.sleep(5); // this failed once and i suspect it is because the query was done too fast expect(numberOfDFGCompiles(count)).toBeGreaterThan(0); }); it("releaseWeakRefs", () => { diff --git a/test/js/bun/net/socket.test.ts b/test/js/bun/net/socket.test.ts index 70173d31a1..77d59917cc 100644 --- a/test/js/bun/net/socket.test.ts +++ b/test/js/bun/net/socket.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { expect, it } from "bun:test"; import { bunEnv, bunExe, expectMaxObjectTypeCount } from "harness"; import { connect, SocketHandler, spawn } from "bun"; diff --git a/test/js/bun/net/tcp-server.test.ts b/test/js/bun/net/tcp-server.test.ts index ef8026a6c8..fb1d60f9d8 100644 --- a/test/js/bun/net/tcp-server.test.ts +++ b/test/js/bun/net/tcp-server.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { listen, connect, TCPSocketListener, SocketHandler } from "bun"; import { describe, expect, it } from "bun:test"; import { expectMaxObjectTypeCount } from "harness"; diff --git a/test/js/bun/plugin/plugins.test.ts b/test/js/bun/plugin/plugins.test.ts index 2d3cfa1fad..9425afed8b 100644 --- a/test/js/bun/plugin/plugins.test.ts +++ b/test/js/bun/plugin/plugins.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing /// import { plugin } from "bun"; import { describe, expect, it } from "bun:test"; diff --git a/test/js/bun/resolve/import-meta.test.js b/test/js/bun/resolve/import-meta.test.js index c521a3756b..870e55f6fd 100644 --- a/test/js/bun/resolve/import-meta.test.js +++ b/test/js/bun/resolve/import-meta.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { spawnSync } from "bun"; import { expect, it } from "bun:test"; import { bunEnv, bunExe } from "harness"; diff --git a/test/js/bun/resolve/non-english-import.test.js b/test/js/bun/resolve/non-english-import.test.js index f82b123103..944218b36a 100644 --- a/test/js/bun/resolve/non-english-import.test.js +++ b/test/js/bun/resolve/non-english-import.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing // We do not make these files imports in the codebase because non-ascii file paths can cause issues with git // Instead, we put them into a temporary directory and run them from there import { test, expect } from "bun:test"; diff --git a/test/js/bun/resolve/png/test-png-import.test.js b/test/js/bun/resolve/png/test-png-import.test.js index ca2d0b9ce7..69e5b8710b 100644 --- a/test/js/bun/resolve/png/test-png-import.test.js +++ b/test/js/bun/resolve/png/test-png-import.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { expect, test } from "bun:test"; import { resolve } from "path"; import MyPNG from "./test-png.png"; diff --git a/test/js/bun/resolve/resolve-ts.test.ts b/test/js/bun/resolve/resolve-ts.test.ts index 6c130a59eb..5f72451734 100644 --- a/test/js/bun/resolve/resolve-ts.test.ts +++ b/test/js/bun/resolve/resolve-ts.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { test, expect, describe } from "bun:test"; import { bunEnv, bunExe, tempDirWithFiles } from "harness"; diff --git a/test/js/bun/resolve/resolve.test.ts b/test/js/bun/resolve/resolve.test.ts index aeccf3b604..3b0d4e23f0 100644 --- a/test/js/bun/resolve/resolve.test.ts +++ b/test/js/bun/resolve/resolve.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { it, expect } from "bun:test"; import { mkdirSync, writeFileSync, existsSync, rmSync, copyFileSync } from "fs"; import { join } from "path"; diff --git a/test/js/bun/spawn/exit-code.test.ts b/test/js/bun/spawn/exit-code.test.ts index 1b97179f62..a9cbf07a44 100644 --- a/test/js/bun/spawn/exit-code.test.ts +++ b/test/js/bun/spawn/exit-code.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, expect, it, test } from "bun:test"; import { bunExe } from "harness"; import { spawnSync } from "bun"; diff --git a/test/js/bun/spawn/spawn-streaming-stdin.test.ts b/test/js/bun/spawn/spawn-streaming-stdin.test.ts index c7065a681a..1f9d804733 100644 --- a/test/js/bun/spawn/spawn-streaming-stdin.test.ts +++ b/test/js/bun/spawn/spawn-streaming-stdin.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { it, test, expect } from "bun:test"; import { spawn } from "bun"; import { bunExe, bunEnv, gcTick } from "harness"; diff --git a/test/js/bun/spawn/spawn-streaming-stdout.test.ts b/test/js/bun/spawn/spawn-streaming-stdout.test.ts index bea2b3b516..7fc7161661 100644 --- a/test/js/bun/spawn/spawn-streaming-stdout.test.ts +++ b/test/js/bun/spawn/spawn-streaming-stdout.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { it, test, expect } from "bun:test"; import { spawn } from "bun"; import { bunExe, bunEnv, gcTick } from "harness"; diff --git a/test/js/bun/spawn/spawn.test.ts b/test/js/bun/spawn/spawn.test.ts index 85bd974eaf..860bb25fe2 100644 --- a/test/js/bun/spawn/spawn.test.ts +++ b/test/js/bun/spawn/spawn.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { ArrayBufferSink, readableStreamToText, spawn, spawnSync, write } from "bun"; import { describe, expect, it } from "bun:test"; import { gcTick as _gcTick, bunExe, bunEnv } from "harness"; diff --git a/test/js/bun/sqlite/sqlite.test.js b/test/js/bun/sqlite/sqlite.test.js index b030de8a67..a2c6b63691 100644 --- a/test/js/bun/sqlite/sqlite.test.js +++ b/test/js/bun/sqlite/sqlite.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { expect, it, describe } from "bun:test"; import { Database, constants, SQLiteError } from "bun:sqlite"; import { existsSync, fstat, realpathSync, rmSync, writeFileSync } from "fs"; diff --git a/test/js/bun/stream/direct-readable-stream.test.tsx b/test/js/bun/stream/direct-readable-stream.test.tsx index 1f090671bc..ba8c9cbc67 100644 --- a/test/js/bun/stream/direct-readable-stream.test.tsx +++ b/test/js/bun/stream/direct-readable-stream.test.tsx @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { concatArrayBuffers, readableStreamToArray, diff --git a/test/js/bun/test/expect-extend-preload.test.ts b/test/js/bun/test/expect-extend-preload.test.ts index 8818f9b433..eb3bf34159 100644 --- a/test/js/bun/test/expect-extend-preload.test.ts +++ b/test/js/bun/test/expect-extend-preload.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { file } from "bun"; import { test, expect } from "bun:test"; import { bunEnv, bunExe, tempDirWithFiles } from "harness"; diff --git a/test/js/bun/test/expect.test.js b/test/js/bun/test/expect.test.js index 65ec21fcf0..c57354c421 100644 --- a/test/js/bun/test/expect.test.js +++ b/test/js/bun/test/expect.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: panic "switch on corrupt value" // @ts-check /** This file is meant to be runnable in Jest, Vitest, and Bun: diff --git a/test/js/bun/test/jest-extended.test.js b/test/js/bun/test/jest-extended.test.js index 0b81744332..d7b4d7a565 100644 --- a/test/js/bun/test/jest-extended.test.js +++ b/test/js/bun/test/jest-extended.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing "use strict"; /** This file is meant to be runnable in both Jest and Bun. diff --git a/test/js/bun/test/jest-hooks.test.ts b/test/js/bun/test/jest-hooks.test.ts index 618cdc4c6c..a25111997d 100644 --- a/test/js/bun/test/jest-hooks.test.ts +++ b/test/js/bun/test/jest-hooks.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it } from "bun:test"; let hooks_run: string[] = []; diff --git a/test/js/bun/test/mock-fn.test.js b/test/js/bun/test/mock-fn.test.js index 6a700eb385..55b16585e4 100644 --- a/test/js/bun/test/mock-fn.test.js +++ b/test/js/bun/test/mock-fn.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: panic "switch on corrupt value" /** * This file is meant to be runnable in Jest, Vitest, and Bun: * `bun test test/js/bun/test/mock-fn.test.js` diff --git a/test/js/bun/test/snapshot-tests/bun-snapshots.test.ts b/test/js/bun/test/snapshot-tests/bun-snapshots.test.ts index a601ca5560..7d0b630b95 100644 --- a/test/js/bun/test/snapshot-tests/bun-snapshots.test.ts +++ b/test/js/bun/test/snapshot-tests/bun-snapshots.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { it, test, expect, describe } from "bun:test"; test("it will create a snapshot file if it doesn't exist", () => { diff --git a/test/js/bun/test/snapshot-tests/existing-snapshots.test.ts b/test/js/bun/test/snapshot-tests/existing-snapshots.test.ts index e09bee6595..96c1e88c0c 100644 --- a/test/js/bun/test/snapshot-tests/existing-snapshots.test.ts +++ b/test/js/bun/test/snapshot-tests/existing-snapshots.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { it, test, expect, describe } from "bun:test"; test("it will work with an existing snapshot file made with bun", () => { diff --git a/test/js/bun/test/snapshot-tests/new-snapshot.test.ts b/test/js/bun/test/snapshot-tests/new-snapshot.test.ts index 51aa48a136..4d2dc25489 100644 --- a/test/js/bun/test/snapshot-tests/new-snapshot.test.ts +++ b/test/js/bun/test/snapshot-tests/new-snapshot.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import fs from "fs"; import { bunExe } from "harness"; import { tmpdir } from "os"; diff --git a/test/js/bun/test/snapshot-tests/snapshots/moremore.test.ts b/test/js/bun/test/snapshot-tests/snapshots/moremore.test.ts index d54dcc6f7c..0ea5087508 100644 --- a/test/js/bun/test/snapshot-tests/snapshots/moremore.test.ts +++ b/test/js/bun/test/snapshot-tests/snapshots/moremore.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { it, test, expect, describe } from "bun:test"; class Number2 extends Number { diff --git a/test/js/bun/test/snapshot-tests/snapshots/snapshot.test.ts b/test/js/bun/test/snapshot-tests/snapshots/snapshot.test.ts index 519a0169f2..90654ca24d 100644 --- a/test/js/bun/test/snapshot-tests/snapshots/snapshot.test.ts +++ b/test/js/bun/test/snapshot-tests/snapshots/snapshot.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { it, test, expect, describe } from "bun:test"; function test1000000(arg1: any, arg218718132: any) {} diff --git a/test/js/bun/test/test-test.test.ts b/test/js/bun/test/test-test.test.ts index b2d2151cf9..d1dccd6800 100644 --- a/test/js/bun/test/test-test.test.ts +++ b/test/js/bun/test/test-test.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing // @ts-nocheck import { spawn, spawnSync } from "bun"; import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it, test } from "bun:test"; diff --git a/test/js/bun/util/__snapshots__/inspect-error.test.js.snap b/test/js/bun/util/__snapshots__/inspect-error.test.js.snap index 00aab87233..82555bf5c5 100644 --- a/test/js/bun/util/__snapshots__/inspect-error.test.js.snap +++ b/test/js/bun/util/__snapshots__/inspect-error.test.js.snap @@ -1,35 +1,37 @@ // Bun Snapshot v1, https://goo.gl/fbAQLP exports[`error.cause 1`] = ` -"1 | import { test, expect } from "bun:test"; -2 | -3 | test("error.cause", () => { -4 | const err = new Error("error 1"); -5 | const err2 = new Error("error 2", { cause: err }); +"1 | // @known-failing-on-windows: 1 failing +2 | import { test, expect } from "bun:test"; +3 | +4 | test("error.cause", () => { +5 | const err = new Error("error 1"); +6 | const err2 = new Error("error 2", { cause: err }); ^ error: error 2 - at [dir]/inspect-error.test.js:5:16 + at [dir]/inspect-error.test.js:6:16 -1 | import { test, expect } from "bun:test"; -2 | -3 | test("error.cause", () => { -4 | const err = new Error("error 1"); +1 | // @known-failing-on-windows: 1 failing +2 | import { test, expect } from "bun:test"; +3 | +4 | test("error.cause", () => { +5 | const err = new Error("error 1"); ^ error: error 1 - at [dir]/inspect-error.test.js:4:15 + at [dir]/inspect-error.test.js:5:15 " `; exports[`Error 1`] = ` -" 5 | const err2 = new Error("error 2", { cause: err }); - 6 | expect(Bun.inspect(err2).replaceAll(import.meta.dir, "[dir]")).toMatchSnapshot(); - 7 | }); - 8 | - 9 | test("Error", () => { -10 | const err = new Error("my message"); +" 6 | const err2 = new Error("error 2", { cause: err }); + 7 | expect(Bun.inspect(err2).replaceAll(import.meta.dir, "[dir]")).toMatchSnapshot(); + 8 | }); + 9 | +10 | test("Error", () => { +11 | const err = new Error("my message"); ^ error: my message - at [dir]/inspect-error.test.js:10:15 + at [dir]/inspect-error.test.js:11:15 " `; diff --git a/test/js/bun/util/bun-file-exists.test.js b/test/js/bun/util/bun-file-exists.test.js index cca28e3599..603c7adf34 100644 --- a/test/js/bun/util/bun-file-exists.test.js +++ b/test/js/bun/util/bun-file-exists.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { test, expect } from "bun:test"; import { join } from "path"; import { tmpdir } from "os"; diff --git a/test/js/bun/util/bun-file-read.test.ts b/test/js/bun/util/bun-file-read.test.ts index 196c81a3b4..dda46599fd 100644 --- a/test/js/bun/util/bun-file-read.test.ts +++ b/test/js/bun/util/bun-file-read.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { it, expect } from "bun:test"; import { tmpdir } from "node:os"; diff --git a/test/js/bun/util/bun-isMainThread.test.js b/test/js/bun/util/bun-isMainThread.test.js index 87f74d136c..46fecbc743 100644 --- a/test/js/bun/util/bun-isMainThread.test.js +++ b/test/js/bun/util/bun-isMainThread.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { test, expect } from "bun:test"; import { bunEnv, bunExe } from "harness"; diff --git a/test/js/bun/util/error-gc-test.test.js b/test/js/bun/util/error-gc-test.test.js index 4a45346b64..bb9e6a14f0 100644 --- a/test/js/bun/util/error-gc-test.test.js +++ b/test/js/bun/util/error-gc-test.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { test, expect } from "bun:test"; import { readFileSync } from "fs"; // This test checks that printing stack traces increments and decrements diff --git a/test/js/bun/util/fileUrl.test.js b/test/js/bun/util/fileUrl.test.js index f1bbe74619..4befe02592 100644 --- a/test/js/bun/util/fileUrl.test.js +++ b/test/js/bun/util/fileUrl.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { expect, it, describe } from "bun:test"; import { pathToFileURL, fileURLToPath } from "bun"; describe("pathToFileURL", () => { diff --git a/test/js/bun/util/filesink.test.ts b/test/js/bun/util/filesink.test.ts index 1f41e3c56b..5d062e266d 100644 --- a/test/js/bun/util/filesink.test.ts +++ b/test/js/bun/util/filesink.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { ArrayBufferSink } from "bun"; import { describe, expect, it } from "bun:test"; import { mkfifo } from "mkfifo"; diff --git a/test/js/bun/util/filesystem_router.test.ts b/test/js/bun/util/filesystem_router.test.ts index 5a6f7c8864..c29e91a6c8 100644 --- a/test/js/bun/util/filesystem_router.test.ts +++ b/test/js/bun/util/filesystem_router.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { FileSystemRouter } from "bun"; import { it, expect } from "bun:test"; import path, { dirname, resolve } from "path"; diff --git a/test/js/bun/util/inspect-error.test.js b/test/js/bun/util/inspect-error.test.js index 4a67cd14a6..f9f8feb701 100644 --- a/test/js/bun/util/inspect-error.test.js +++ b/test/js/bun/util/inspect-error.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { test, expect } from "bun:test"; test("error.cause", () => { diff --git a/test/js/bun/util/inspect.test.js b/test/js/bun/util/inspect.test.js index c57faa6fe3..a6409efa38 100644 --- a/test/js/bun/util/inspect.test.js +++ b/test/js/bun/util/inspect.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { it, expect, describe } from "bun:test"; import util from "util"; diff --git a/test/js/bun/util/mmap.test.js b/test/js/bun/util/mmap.test.js index 4972359da5..870afca9ad 100644 --- a/test/js/bun/util/mmap.test.js +++ b/test/js/bun/util/mmap.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, it, expect } from "bun:test"; import { gcTick } from "harness"; diff --git a/test/js/bun/util/password.test.ts b/test/js/bun/util/password.test.ts index 0f916ca447..0fe0f83dc9 100644 --- a/test/js/bun/util/password.test.ts +++ b/test/js/bun/util/password.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { test, expect, describe } from "bun:test"; import { Password, password } from "bun"; diff --git a/test/js/bun/util/reportError.test.ts b/test/js/bun/util/reportError.test.ts index f224b57ffa..223e0f626a 100644 --- a/test/js/bun/util/reportError.test.ts +++ b/test/js/bun/util/reportError.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { test, expect } from "bun:test"; import { spawnSync } from "bun"; import { bunEnv, bunExe } from "harness"; diff --git a/test/js/bun/util/text-loader.test.ts b/test/js/bun/util/text-loader.test.ts index f7d3b2a284..a081b6daa9 100644 --- a/test/js/bun/util/text-loader.test.ts +++ b/test/js/bun/util/text-loader.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { spawnSync } from "bun"; import { describe, expect, it } from "bun:test"; import { bunEnv, bunExe } from "harness"; diff --git a/test/js/bun/util/unsafe.test.js b/test/js/bun/util/unsafe.test.js index 38830fa36d..78280dd367 100644 --- a/test/js/bun/util/unsafe.test.js +++ b/test/js/bun/util/unsafe.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { test, expect, it, describe } from "bun:test"; import { gc } from "harness"; diff --git a/test/js/bun/util/which.test.ts b/test/js/bun/util/which.test.ts index 9ed1d25a30..248f9bdfcf 100644 --- a/test/js/bun/util/which.test.ts +++ b/test/js/bun/util/which.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { test, expect } from "bun:test"; import { which } from "bun"; diff --git a/test/js/bun/wasm/wasi.test.js b/test/js/bun/wasm/wasi.test.js index ac1d986d46..93d5cbe341 100644 --- a/test/js/bun/wasm/wasi.test.js +++ b/test/js/bun/wasm/wasi.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { spawnSync } from "bun"; import { expect, it } from "bun:test"; import { bunExe, bunEnv } from "harness"; diff --git a/test/js/bun/websocket/websocket-server.test.ts b/test/js/bun/websocket/websocket-server.test.ts index dfe23e57f1..17bcc3815b 100644 --- a/test/js/bun/websocket/websocket-server.test.ts +++ b/test/js/bun/websocket/websocket-server.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, it, expect, afterEach } from "bun:test"; import type { Server, Subprocess, WebSocketHandler } from "bun"; import { serve, spawn } from "bun"; diff --git a/test/js/deno/crypto/webcrypto.test.ts b/test/js/deno/crypto/webcrypto.test.ts index 7b8722a8ae..632826dcf9 100644 --- a/test/js/deno/crypto/webcrypto.test.ts +++ b/test/js/deno/crypto/webcrypto.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing // GENERATED - DO NOT EDIT // Copyright 2018+ the Deno authors. All rights reserved. MIT license. // https://raw.githubusercontent.com/denoland/deno/main/cli/tests/unit/webcrypto_test.ts diff --git a/test/js/deno/encoding/encoding.test.ts b/test/js/deno/encoding/encoding.test.ts index 50956e6737..e107b6d1a9 100644 --- a/test/js/deno/encoding/encoding.test.ts +++ b/test/js/deno/encoding/encoding.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing // GENERATED - DO NOT EDIT // Copyright 2018+ the Deno authors. All rights reserved. MIT license. // https://raw.githubusercontent.com/denoland/deno/main/cli/tests/unit/text_encoding_test.ts diff --git a/test/js/deno/event/custom-event.test.ts b/test/js/deno/event/custom-event.test.ts index 4abd3ea7de..331a05b75b 100644 --- a/test/js/deno/event/custom-event.test.ts +++ b/test/js/deno/event/custom-event.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing // GENERATED - DO NOT EDIT // Copyright 2018+ the Deno authors. All rights reserved. MIT license. // https://raw.githubusercontent.com/denoland/deno/main/cli/tests/unit/custom_event_test.ts diff --git a/test/js/deno/event/event-target.test.ts b/test/js/deno/event/event-target.test.ts index 2ab5786634..c8db38aae3 100644 --- a/test/js/deno/event/event-target.test.ts +++ b/test/js/deno/event/event-target.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing // GENERATED - DO NOT EDIT // Copyright 2018+ the Deno authors. All rights reserved. MIT license. // https://raw.githubusercontent.com/denoland/deno/main/cli/tests/unit/event_target_test.ts diff --git a/test/js/deno/event/event.test.ts b/test/js/deno/event/event.test.ts index 633ba51dab..eb996d2596 100644 --- a/test/js/deno/event/event.test.ts +++ b/test/js/deno/event/event.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing // GENERATED - DO NOT EDIT // Copyright 2018+ the Deno authors. All rights reserved. MIT license. // https://raw.githubusercontent.com/denoland/deno/main/cli/tests/unit/event_test.ts diff --git a/test/js/deno/fetch/blob.test.ts b/test/js/deno/fetch/blob.test.ts index 5a6c2fb803..30b1f0a9f7 100644 --- a/test/js/deno/fetch/blob.test.ts +++ b/test/js/deno/fetch/blob.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing // GENERATED - DO NOT EDIT // Copyright 2018+ the Deno authors. All rights reserved. MIT license. // https://raw.githubusercontent.com/denoland/deno/main/cli/tests/unit/blob_test.ts diff --git a/test/js/deno/fetch/body.test.ts b/test/js/deno/fetch/body.test.ts index b2c986ffdf..798e630618 100644 --- a/test/js/deno/fetch/body.test.ts +++ b/test/js/deno/fetch/body.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing // GENERATED - DO NOT EDIT // Copyright 2018+ the Deno authors. All rights reserved. MIT license. // https://raw.githubusercontent.com/denoland/deno/main/cli/tests/unit/body_test.ts diff --git a/test/js/deno/fetch/headers.test.ts b/test/js/deno/fetch/headers.test.ts index efc4e6a6e1..0b536546e6 100644 --- a/test/js/deno/fetch/headers.test.ts +++ b/test/js/deno/fetch/headers.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing // GENERATED - DO NOT EDIT // Copyright 2018+ the Deno authors. All rights reserved. MIT license. // https://raw.githubusercontent.com/denoland/deno/main/cli/tests/unit/headers_test.ts diff --git a/test/js/deno/fetch/response.test.ts b/test/js/deno/fetch/response.test.ts index a8066c75b4..78f647609b 100644 --- a/test/js/deno/fetch/response.test.ts +++ b/test/js/deno/fetch/response.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing // GENERATED - DO NOT EDIT // Copyright 2018+ the Deno authors. All rights reserved. MIT license. // https://raw.githubusercontent.com/denoland/deno/main/cli/tests/unit/response_test.ts diff --git a/test/js/deno/performance/performance.test.ts b/test/js/deno/performance/performance.test.ts index 1fa974fe83..259f0f1ae7 100644 --- a/test/js/deno/performance/performance.test.ts +++ b/test/js/deno/performance/performance.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: panic "switch on corrupt value" // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { createDenoTest } from "deno:harness"; const { test, diff --git a/test/js/deno/url/url.test.ts b/test/js/deno/url/url.test.ts index 09184b3b2c..4e7235d111 100644 --- a/test/js/deno/url/url.test.ts +++ b/test/js/deno/url/url.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing // GENERATED - DO NOT EDIT // Copyright 2018+ the Deno authors. All rights reserved. MIT license. // https://raw.githubusercontent.com/denoland/deno/main/cli/tests/unit/url_test.ts diff --git a/test/js/deno/url/urlsearchparams.test.ts b/test/js/deno/url/urlsearchparams.test.ts index 04e5359f5b..de0d25b273 100644 --- a/test/js/deno/url/urlsearchparams.test.ts +++ b/test/js/deno/url/urlsearchparams.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing // GENERATED - DO NOT EDIT // Copyright 2018+ the Deno authors. All rights reserved. MIT license. // https://raw.githubusercontent.com/denoland/deno/main/cli/tests/unit/url_search_params_test.ts diff --git a/test/js/deno/v8/error.test.ts b/test/js/deno/v8/error.test.ts index 9af2beb56a..27b1ba43d4 100644 --- a/test/js/deno/v8/error.test.ts +++ b/test/js/deno/v8/error.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing // GENERATED - DO NOT EDIT // Copyright 2018+ the Deno authors. All rights reserved. MIT license. // https://raw.githubusercontent.com/denoland/deno/main/cli/tests/unit/error_stack_test.ts diff --git a/test/js/first_party/undici/undici.test.ts b/test/js/first_party/undici/undici.test.ts index f7199e9f54..86cc16b30c 100644 --- a/test/js/first_party/undici/undici.test.ts +++ b/test/js/first_party/undici/undici.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, it, expect, beforeAll, afterAll } from "bun:test"; import { request } from "undici"; diff --git a/test/js/first_party/ws/ws.test.ts b/test/js/first_party/ws/ws.test.ts index b13ef49746..683b9ab2e4 100644 --- a/test/js/first_party/ws/ws.test.ts +++ b/test/js/first_party/ws/ws.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, it, expect, beforeEach, afterEach } from "bun:test"; import type { Subprocess } from "bun"; import { spawn } from "bun"; diff --git a/test/js/node/async_hooks/AsyncLocalStorage.test.ts b/test/js/node/async_hooks/AsyncLocalStorage.test.ts index 40faf439ca..b5ae59431b 100644 --- a/test/js/node/async_hooks/AsyncLocalStorage.test.ts +++ b/test/js/node/async_hooks/AsyncLocalStorage.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { AsyncLocalStorage, AsyncResource } from "async_hooks"; import { describe, expect, test } from "bun:test"; diff --git a/test/js/node/buffer.test.js b/test/js/node/buffer.test.js index ee32d73218..a6d067acb7 100644 --- a/test/js/node/buffer.test.js +++ b/test/js/node/buffer.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { Buffer, SlowBuffer, isAscii, isUtf8 } from "buffer"; import { describe, it, expect, beforeEach, afterEach } from "bun:test"; import { gc } from "harness"; diff --git a/test/js/node/child_process/child-process-stdio.test.js b/test/js/node/child_process/child-process-stdio.test.js index 666f59fc28..3be90dc49a 100644 --- a/test/js/node/child_process/child-process-stdio.test.js +++ b/test/js/node/child_process/child-process-stdio.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, it, expect, beforeAll } from "bun:test"; import { spawn, execSync } from "node:child_process"; import { bunExe, bunEnv } from "harness"; diff --git a/test/js/node/child_process/child_process-node.test.js b/test/js/node/child_process/child_process-node.test.js index 70f637795a..3466d7af9d 100644 --- a/test/js/node/child_process/child_process-node.test.js +++ b/test/js/node/child_process/child_process-node.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { ChildProcess, spawn, exec, fork } from "node:child_process"; import { createTest } from "node-harness"; import { tmpdir } from "node:os"; diff --git a/test/js/node/child_process/child_process.test.ts b/test/js/node/child_process/child_process.test.ts index e94e163114..367b11a6ff 100644 --- a/test/js/node/child_process/child_process.test.ts +++ b/test/js/node/child_process/child_process.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, it, expect } from "bun:test"; import { ChildProcess, spawn, execFile, exec, fork, spawnSync, execFileSync, execSync } from "node:child_process"; import { tmpdir } from "node:os"; diff --git a/test/js/node/crypto/crypto.key-objects.test.ts b/test/js/node/crypto/crypto.key-objects.test.ts index 0598c25ba6..aac9665438 100644 --- a/test/js/node/crypto/crypto.key-objects.test.ts +++ b/test/js/node/crypto/crypto.key-objects.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing "use strict"; import { diff --git a/test/js/node/crypto/node-crypto.test.js b/test/js/node/crypto/node-crypto.test.js index 9fff88b5d1..2fb30c7f7f 100644 --- a/test/js/node/crypto/node-crypto.test.js +++ b/test/js/node/crypto/node-crypto.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { it, expect, describe } from "bun:test"; import crypto from "node:crypto"; diff --git a/test/js/node/diagnostics_channel/diagnostics_channel.test.ts b/test/js/node/diagnostics_channel/diagnostics_channel.test.ts index d7fd10eefa..50e46ae782 100644 --- a/test/js/node/diagnostics_channel/diagnostics_channel.test.ts +++ b/test/js/node/diagnostics_channel/diagnostics_channel.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { gc } from "bun"; import { describe, test, expect, mock, beforeEach } from "bun:test"; import { channel, Channel, hasSubscribers, subscribe, unsubscribe } from "node:diagnostics_channel"; diff --git a/test/js/node/dns/node-dns.test.js b/test/js/node/dns/node-dns.test.js index edf58308a1..81597418e1 100644 --- a/test/js/node/dns/node-dns.test.js +++ b/test/js/node/dns/node-dns.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, expect, test, it } from "bun:test"; import * as dns from "node:dns"; import * as dns_promises from "node:dns/promises"; diff --git a/test/js/node/events/event-emitter.test.ts b/test/js/node/events/event-emitter.test.ts index 687e90910e..c18fea561b 100644 --- a/test/js/node/events/event-emitter.test.ts +++ b/test/js/node/events/event-emitter.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { test, describe, expect } from "bun:test"; import { sleep } from "bun"; import { createRequire } from "module"; diff --git a/test/js/node/fs/cp.test.ts b/test/js/node/fs/cp.test.ts index 2baeaf8f56..3ec54d3511 100644 --- a/test/js/node/fs/cp.test.ts +++ b/test/js/node/fs/cp.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import fs from "fs"; import { describe, test, expect, jest } from "bun:test"; import { tempDirWithFiles } from "harness"; diff --git a/test/js/node/fs/fs.test.ts b/test/js/node/fs/fs.test.ts index 290f4dd88c..2e865f3cd4 100644 --- a/test/js/node/fs/fs.test.ts +++ b/test/js/node/fs/fs.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, expect, it } from "bun:test"; import { dirname, resolve, relative } from "node:path"; import { promisify } from "node:util"; diff --git a/test/js/node/http/node-fetch-cjs.test.js b/test/js/node/http/node-fetch-cjs.test.js index 9a6a4b4075..1c72e1b16f 100644 --- a/test/js/node/http/node-fetch-cjs.test.js +++ b/test/js/node/http/node-fetch-cjs.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing const fetch = require("node-fetch"); test("require('node-fetch') fetches", async () => { diff --git a/test/js/node/http/node-fetch.test.js b/test/js/node/http/node-fetch.test.js index 152ef03849..87defea7c6 100644 --- a/test/js/node/http/node-fetch.test.js +++ b/test/js/node/http/node-fetch.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import fetch2, { fetch, Response, Request, Headers } from "node-fetch"; import * as iso from "isomorphic-fetch"; import * as vercelFetch from "@vercel/fetch"; diff --git a/test/js/node/http/node-http.test.ts b/test/js/node/http/node-http.test.ts index a8e2372211..4e84b1f6de 100644 --- a/test/js/node/http/node-http.test.ts +++ b/test/js/node/http/node-http.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing // @ts-nocheck import { createServer, diff --git a/test/js/node/http2/node-http2.test.js b/test/js/node/http2/node-http2.test.js index c56bac9163..6fd2ea7091 100644 --- a/test/js/node/http2/node-http2.test.js +++ b/test/js/node/http2/node-http2.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import http2 from "node:http2"; import { Duplex } from "stream"; import tls from "node:tls"; diff --git a/test/js/node/module/node-module-module.test.js b/test/js/node/module/node-module-module.test.js index c3d9a24be5..c5453e4ede 100644 --- a/test/js/node/module/node-module-module.test.js +++ b/test/js/node/module/node-module-module.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { expect, test } from "bun:test"; import { bunEnv, bunExe } from "harness"; import { _nodeModulePaths, builtinModules, isBuiltin, wrap } from "module"; diff --git a/test/js/node/net/node-net-server.test.ts b/test/js/node/net/node-net-server.test.ts index bef4ca2a99..1ad14400bd 100644 --- a/test/js/node/net/node-net-server.test.ts +++ b/test/js/node/net/node-net-server.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { createServer, Server, AddressInfo, Socket } from "net"; import { realpathSync } from "fs"; import { tmpdir } from "os"; diff --git a/test/js/node/net/node-net.test.ts b/test/js/node/net/node-net.test.ts index a18c3df074..b2f5e0e265 100644 --- a/test/js/node/net/node-net.test.ts +++ b/test/js/node/net/node-net.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { ServerWebSocket, TCPSocket, Socket as _BunSocket, TCPSocketListener } from "bun"; import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it } from "bun:test"; import { connect, isIP, isIPv4, isIPv6, Socket, createConnection } from "net"; diff --git a/test/js/node/os/os.test.js b/test/js/node/os/os.test.js index 7d64719d4c..1b6c27a108 100644 --- a/test/js/node/os/os.test.js +++ b/test/js/node/os/os.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { it, expect } from "bun:test"; import * as os from "node:os"; import { realpathSync } from "fs"; diff --git a/test/js/node/process/process-args.test.js b/test/js/node/process/process-args.test.js index 4da3a5381f..cb9bda00d0 100644 --- a/test/js/node/process/process-args.test.js +++ b/test/js/node/process/process-args.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { spawn } from "bun"; import { test, expect } from "bun:test"; import { bunExe } from "harness"; diff --git a/test/js/node/process/process-nexttick.test.js b/test/js/node/process/process-nexttick.test.js index 6f1eee6ba4..d4fd2a050c 100644 --- a/test/js/node/process/process-nexttick.test.js +++ b/test/js/node/process/process-nexttick.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing // Running this file in jest/vitest does not work as expected. Jest & Vitest // mess with timers, producing unreliable results. You must manually test this // in Node. diff --git a/test/js/node/process/process-stdio.test.ts b/test/js/node/process/process-stdio.test.ts index 919f9dec35..049c94642f 100644 --- a/test/js/node/process/process-stdio.test.ts +++ b/test/js/node/process/process-stdio.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { spawn, spawnSync } from "bun"; import { describe, expect, it, test } from "bun:test"; import { bunExe } from "harness"; diff --git a/test/js/node/process/process.test.js b/test/js/node/process/process.test.js index c055fb6a03..f8e720e614 100644 --- a/test/js/node/process/process.test.js +++ b/test/js/node/process/process.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { spawnSync, which } from "bun"; import { describe, expect, it } from "bun:test"; import { existsSync, readFileSync } from "fs"; diff --git a/test/js/node/readline/readline.node.test.ts b/test/js/node/readline/readline.node.test.ts index a30afcc829..7843672957 100644 --- a/test/js/node/readline/readline.node.test.ts +++ b/test/js/node/readline/readline.node.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing // @ts-nocheck import readline from "node:readline"; import { Writable, PassThrough } from "node:stream"; diff --git a/test/js/node/stream/node-stream.test.js b/test/js/node/stream/node-stream.test.js index f8cd2238f7..1bbc8a3b9c 100644 --- a/test/js/node/stream/node-stream.test.js +++ b/test/js/node/stream/node-stream.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { expect, describe, it } from "bun:test"; import { Readable, Writable, Duplex, Transform, PassThrough } from "node:stream"; import { createReadStream } from "node:fs"; diff --git a/test/js/node/string_decoder/string-decoder.test.js b/test/js/node/string_decoder/string-decoder.test.js index 5e8463955c..f95476f7c8 100644 --- a/test/js/node/string_decoder/string-decoder.test.js +++ b/test/js/node/string_decoder/string-decoder.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, expect, it } from "bun:test"; import { withoutAggressiveGC } from "harness"; diff --git a/test/js/node/stubs.test.js b/test/js/node/stubs.test.js index 5830895d1a..bb32da25dd 100644 --- a/test/js/node/stubs.test.js +++ b/test/js/node/stubs.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { expect, test } from "bun:test"; const weirdInternalSpecifiers = [ diff --git a/test/js/node/timers/node-timers.test.ts b/test/js/node/timers/node-timers.test.ts index 412eabc221..1b1a00a6f9 100644 --- a/test/js/node/timers/node-timers.test.ts +++ b/test/js/node/timers/node-timers.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, test } from "bun:test"; import { setTimeout, clearTimeout, setInterval, clearInterval, setImmediate } from "node:timers"; diff --git a/test/js/node/tls/fetch-tls-cert.test.ts b/test/js/node/tls/fetch-tls-cert.test.ts index 150f315933..219bc6b746 100644 --- a/test/js/node/tls/fetch-tls-cert.test.ts +++ b/test/js/node/tls/fetch-tls-cert.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { expect, it } from "bun:test"; import tls from "tls"; import type { Server, TLSSocket } from "node:tls"; diff --git a/test/js/node/tls/node-tls-cert.test.ts b/test/js/node/tls/node-tls-cert.test.ts index cc10c73b25..f3bb8eb3ab 100644 --- a/test/js/node/tls/node-tls-cert.test.ts +++ b/test/js/node/tls/node-tls-cert.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { expect, it } from "bun:test"; import tls from "tls"; import type { Server, TLSSocket } from "node:tls"; diff --git a/test/js/node/tls/node-tls-connect.test.ts b/test/js/node/tls/node-tls-connect.test.ts index 3bcf49db01..e9bfadceec 100644 --- a/test/js/node/tls/node-tls-connect.test.ts +++ b/test/js/node/tls/node-tls-connect.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import tls, { TLSSocket, connect, checkServerIdentity, createServer, Server } from "tls"; import { join } from "path"; import { AddressInfo } from "ws"; diff --git a/test/js/node/tls/node-tls-server.test.ts b/test/js/node/tls/node-tls-server.test.ts index 246ec77096..e24a24b201 100644 --- a/test/js/node/tls/node-tls-server.test.ts +++ b/test/js/node/tls/node-tls-server.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import tls, { rootCertificates, connect, createServer, Server, TLSSocket } from "tls"; import type { PeerCertificate } from "tls"; import { realpathSync, readFileSync } from "fs"; diff --git a/test/js/node/tty.test.ts b/test/js/node/tty.test.ts index c1723ad485..75057ba123 100644 --- a/test/js/node/tty.test.ts +++ b/test/js/node/tty.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, it, expect } from "bun:test"; import { WriteStream } from "node:tty"; diff --git a/test/js/node/util/node-inspect-tests/parallel/util-inspect.test.js b/test/js/node/util/node-inspect-tests/parallel/util-inspect.test.js index 12a1bac486..23ac04bab5 100644 --- a/test/js/node/util/node-inspect-tests/parallel/util-inspect.test.js +++ b/test/js/node/util/node-inspect-tests/parallel/util-inspect.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/test/js/node/v8/v8-date-parser.test.js b/test/js/node/v8/v8-date-parser.test.js index 42e5aa4fc4..6b92536059 100644 --- a/test/js/node/v8/v8-date-parser.test.js +++ b/test/js/node/v8/v8-date-parser.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing // Copyright 2013 the V8 project authors. All rights reserved. // Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. // diff --git a/test/js/node/watch/fs.watch.test.ts b/test/js/node/watch/fs.watch.test.ts index 787ce413ce..78c1836792 100644 --- a/test/js/node/watch/fs.watch.test.ts +++ b/test/js/node/watch/fs.watch.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import fs, { FSWatcher } from "node:fs"; import path from "path"; import { tempDirWithFiles, bunRun, bunRunAsScript } from "harness"; diff --git a/test/js/node/watch/fs.watchFile.test.ts b/test/js/node/watch/fs.watchFile.test.ts index 25cd0c8c54..71b70edde8 100644 --- a/test/js/node/watch/fs.watchFile.test.ts +++ b/test/js/node/watch/fs.watchFile.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import fs, { FSWatcher } from "node:fs"; import path from "path"; import { tempDirWithFiles, bunRun, bunRunAsScript } from "harness"; diff --git a/test/js/node/worker_threads/worker_threads.test.ts b/test/js/node/worker_threads/worker_threads.test.ts index 3fd164a889..f00b401c5b 100644 --- a/test/js/node/worker_threads/worker_threads.test.ts +++ b/test/js/node/worker_threads/worker_threads.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import wt, { getEnvironmentData, isMainThread, diff --git a/test/js/node/zlib/zlib.test.js b/test/js/node/zlib/zlib.test.js index b33894a3e7..5a47df3232 100644 --- a/test/js/node/zlib/zlib.test.js +++ b/test/js/node/zlib/zlib.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, it, expect } from "bun:test"; import { gzipSync, deflateSync, inflateSync, gunzipSync } from "bun"; diff --git a/test/js/third_party/body-parser/express-body-parser-test.test.ts b/test/js/third_party/body-parser/express-body-parser-test.test.ts index 402bf3e1ad..249ad9742e 100644 --- a/test/js/third_party/body-parser/express-body-parser-test.test.ts +++ b/test/js/third_party/body-parser/express-body-parser-test.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing // @ts-nocheck // can't use @types/express or @types/body-parser because they // depend on @types/node which conflicts with bun-types diff --git a/test/js/third_party/comlink/comlink.test.ts b/test/js/third_party/comlink/comlink.test.ts index 77d8109504..f3b87ea01f 100644 --- a/test/js/third_party/comlink/comlink.test.ts +++ b/test/js/third_party/comlink/comlink.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { test, expect, describe } from "bun:test"; import { join } from "path"; import * as Comlink from "comlink"; diff --git a/test/js/third_party/es-module-lexer/es-module-lexer.test.ts b/test/js/third_party/es-module-lexer/es-module-lexer.test.ts index 2202a61a67..f203194d10 100644 --- a/test/js/third_party/es-module-lexer/es-module-lexer.test.ts +++ b/test/js/third_party/es-module-lexer/es-module-lexer.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { test, expect } from "bun:test"; import { spawnSync } from "bun"; import { bunEnv, bunExe } from "../../../harness"; diff --git a/test/js/third_party/esbuild/esbuild-child_process.test.ts b/test/js/third_party/esbuild/esbuild-child_process.test.ts index d759381242..70226c43e7 100644 --- a/test/js/third_party/esbuild/esbuild-child_process.test.ts +++ b/test/js/third_party/esbuild/esbuild-child_process.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { spawnSync } from "bun"; import { describe, it, expect, test } from "bun:test"; import { bunEnv, bunExe } from "harness"; diff --git a/test/js/third_party/grpc-js/test-channel-credentials.test.ts b/test/js/third_party/grpc-js/test-channel-credentials.test.ts index db4da3b479..3d494df4e2 100644 --- a/test/js/third_party/grpc-js/test-channel-credentials.test.ts +++ b/test/js/third_party/grpc-js/test-channel-credentials.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing /* * Copyright 2019 gRPC authors. * diff --git a/test/js/third_party/grpc-js/test-client.test.ts b/test/js/third_party/grpc-js/test-client.test.ts index 495958de22..bd254fba69 100644 --- a/test/js/third_party/grpc-js/test-client.test.ts +++ b/test/js/third_party/grpc-js/test-client.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing /* * Copyright 2019 gRPC authors. * diff --git a/test/js/third_party/grpc-js/test-idle-timer.test.ts b/test/js/third_party/grpc-js/test-idle-timer.test.ts index df2e107195..49be795823 100644 --- a/test/js/third_party/grpc-js/test-idle-timer.test.ts +++ b/test/js/third_party/grpc-js/test-idle-timer.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing /* * Copyright 2023 gRPC authors. * diff --git a/test/js/third_party/grpc-js/test-retry.test.ts b/test/js/third_party/grpc-js/test-retry.test.ts index 82a4b8f5f1..e0d5f878e6 100644 --- a/test/js/third_party/grpc-js/test-retry.test.ts +++ b/test/js/third_party/grpc-js/test-retry.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing /* * Copyright 2022 gRPC authors. * diff --git a/test/js/third_party/jsonwebtoken/claim-aud.test.js b/test/js/third_party/jsonwebtoken/claim-aud.test.js index b850b265b5..95ab39b7c2 100644 --- a/test/js/third_party/jsonwebtoken/claim-aud.test.js +++ b/test/js/third_party/jsonwebtoken/claim-aud.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing "use strict"; import jwt from "jsonwebtoken"; diff --git a/test/js/third_party/jsonwebtoken/header-kid.test.js b/test/js/third_party/jsonwebtoken/header-kid.test.js index 0eeea3b084..a4b2a586ca 100644 --- a/test/js/third_party/jsonwebtoken/header-kid.test.js +++ b/test/js/third_party/jsonwebtoken/header-kid.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing "use strict"; import jwt from "jsonwebtoken"; diff --git a/test/js/third_party/jsonwebtoken/issue_70.test.js b/test/js/third_party/jsonwebtoken/issue_70.test.js index 2dfeabe548..522757b5ca 100644 --- a/test/js/third_party/jsonwebtoken/issue_70.test.js +++ b/test/js/third_party/jsonwebtoken/issue_70.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import jwt from "jsonwebtoken"; import { describe, it } from "bun:test"; diff --git a/test/js/third_party/jsonwebtoken/jwt.asymmetric_signing.test.js b/test/js/third_party/jsonwebtoken/jwt.asymmetric_signing.test.js index 848dadb1ae..fb12b7205c 100644 --- a/test/js/third_party/jsonwebtoken/jwt.asymmetric_signing.test.js +++ b/test/js/third_party/jsonwebtoken/jwt.asymmetric_signing.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing const PS_SUPPORTED = true; import jwt from "jsonwebtoken"; import { expect, describe, it } from "bun:test"; diff --git a/test/js/third_party/jsonwebtoken/option-complete.test.js b/test/js/third_party/jsonwebtoken/option-complete.test.js index 2b446e4e26..c7526265c8 100644 --- a/test/js/third_party/jsonwebtoken/option-complete.test.js +++ b/test/js/third_party/jsonwebtoken/option-complete.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing "use strict"; import { expect, describe, it } from "bun:test"; diff --git a/test/js/third_party/jsonwebtoken/rsa-public-key.test.js b/test/js/third_party/jsonwebtoken/rsa-public-key.test.js index c343cb0a96..2217352fe9 100644 --- a/test/js/third_party/jsonwebtoken/rsa-public-key.test.js +++ b/test/js/third_party/jsonwebtoken/rsa-public-key.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing const PS_SUPPORTED = true; import jwt from "jsonwebtoken"; import { expect, describe, it } from "bun:test"; diff --git a/test/js/third_party/jsonwebtoken/schema.test.js b/test/js/third_party/jsonwebtoken/schema.test.js index 5d3845d46b..784a597f3e 100644 --- a/test/js/third_party/jsonwebtoken/schema.test.js +++ b/test/js/third_party/jsonwebtoken/schema.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing var PS_SUPPORTED = true; import jwt from "jsonwebtoken"; import { expect, describe, it } from "bun:test"; diff --git a/test/js/third_party/jsonwebtoken/validateAsymmetricKey.test.js b/test/js/third_party/jsonwebtoken/validateAsymmetricKey.test.js index 4bcf13cb0d..7311a3d66b 100644 --- a/test/js/third_party/jsonwebtoken/validateAsymmetricKey.test.js +++ b/test/js/third_party/jsonwebtoken/validateAsymmetricKey.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { expect, describe, it } from "bun:test"; import { createPrivateKey } from "crypto"; import fs from "fs"; diff --git a/test/js/third_party/jsonwebtoken/verify.test.js b/test/js/third_party/jsonwebtoken/verify.test.js index c7583892f7..6a2d4fb3d8 100644 --- a/test/js/third_party/jsonwebtoken/verify.test.js +++ b/test/js/third_party/jsonwebtoken/verify.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import jwt from "jsonwebtoken"; import { expect, describe, it, afterEach } from "bun:test"; import jws from "jws"; diff --git a/test/js/third_party/jsonwebtoken/wrong_alg.test.js b/test/js/third_party/jsonwebtoken/wrong_alg.test.js index 948e467f90..1913ffa25c 100644 --- a/test/js/third_party/jsonwebtoken/wrong_alg.test.js +++ b/test/js/third_party/jsonwebtoken/wrong_alg.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing var PS_SUPPORTED = true; import jwt from "jsonwebtoken"; import { expect, describe, it } from "bun:test"; diff --git a/test/js/third_party/mongodb/mongodb.test.ts b/test/js/third_party/mongodb/mongodb.test.ts index da0a089cfb..ea7a52c6f0 100644 --- a/test/js/third_party/mongodb/mongodb.test.ts +++ b/test/js/third_party/mongodb/mongodb.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { test, expect, describe } from "bun:test"; import { MongoClient } from "mongodb"; diff --git a/test/js/third_party/postgres/postgres.test.ts b/test/js/third_party/postgres/postgres.test.ts index 991c85d880..723faeb71b 100644 --- a/test/js/third_party/postgres/postgres.test.ts +++ b/test/js/third_party/postgres/postgres.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { test, expect, describe } from "bun:test"; import { Pool, Client } from "pg"; import { parse } from "pg-connection-string"; diff --git a/test/js/third_party/prisma/bun.lockb b/test/js/third_party/prisma/bun.lockb index 65d0238e56..cd7da6c736 100755 Binary files a/test/js/third_party/prisma/bun.lockb and b/test/js/third_party/prisma/bun.lockb differ diff --git a/test/js/third_party/prisma/package.json b/test/js/third_party/prisma/package.json index 4086944d0e..b8e78f0188 100644 --- a/test/js/third_party/prisma/package.json +++ b/test/js/third_party/prisma/package.json @@ -11,8 +11,5 @@ }, "dependencies": { "@prisma/client": "5.1.1" - }, - "scripts": { - "postinstall": "prisma generate --schema=./prisma/schema.prisma" } } diff --git a/test/js/third_party/prisma/prisma.test.ts b/test/js/third_party/prisma/prisma.test.ts index bc225e81bd..098c888fda 100644 --- a/test/js/third_party/prisma/prisma.test.ts +++ b/test/js/third_party/prisma/prisma.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { test as bunTest, expect, describe } from "bun:test"; import { generateClient } from "./helper.ts"; import type { PrismaClient } from "./prisma/types.d.ts"; @@ -19,6 +20,10 @@ async function cleanTestId(prisma: PrismaClient, testId: number) { let Client: typeof PrismaClient; try { + if (type !== "sqlite" && !process.env[`TLS_${type.toUpperCase()}_DATABASE_URL`]) { + throw new Error(`$TLS_${type.toUpperCase()}_DATABASE_URL is not set`); + } + Client = await generateClient(type); } catch (err: any) { console.warn(`Skipping ${type} tests, failed to generate/migrate`, err.message); diff --git a/test/js/third_party/prompts/prompts.test.ts b/test/js/third_party/prompts/prompts.test.ts index 7e052fa6de..6971f10905 100644 --- a/test/js/third_party/prompts/prompts.test.ts +++ b/test/js/third_party/prompts/prompts.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import path from "path"; import { bunExe, bunEnv } from "harness"; diff --git a/test/js/third_party/resvg/bbox.test.js b/test/js/third_party/resvg/bbox.test.js index 0c8a195781..2932edcc7e 100644 --- a/test/js/third_party/resvg/bbox.test.js +++ b/test/js/third_party/resvg/bbox.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: code 3765269347 import { test, expect } from "bun:test"; import { Resvg } from "@resvg/resvg-js"; diff --git a/test/js/third_party/rollup-v4/rollup-v4.test.ts b/test/js/third_party/rollup-v4/rollup-v4.test.ts index 9aef2c0275..3c8ff062f8 100644 --- a/test/js/third_party/rollup-v4/rollup-v4.test.ts +++ b/test/js/third_party/rollup-v4/rollup-v4.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { parseAst } from "rollup/parseAst"; test("it works", () => { diff --git a/test/js/third_party/socket.io/socket.io-close.test.ts b/test/js/third_party/socket.io/socket.io-close.test.ts index feac0fbad1..bef50f0243 100644 --- a/test/js/third_party/socket.io/socket.io-close.test.ts +++ b/test/js/third_party/socket.io/socket.io-close.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, it, expect } from "bun:test"; import { io as ioc } from "socket.io-client"; import { join } from "path"; diff --git a/test/js/third_party/socket.io/socket.io-connection-state-recovery.test.ts b/test/js/third_party/socket.io/socket.io-connection-state-recovery.test.ts index 02a5271962..6677d29633 100644 --- a/test/js/third_party/socket.io/socket.io-connection-state-recovery.test.ts +++ b/test/js/third_party/socket.io/socket.io-connection-state-recovery.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, it, expect } from "bun:test"; import { Server, Socket } from "socket.io"; diff --git a/test/js/third_party/socket.io/socket.io-handshake.test.ts b/test/js/third_party/socket.io/socket.io-handshake.test.ts index e298080804..0477b863fb 100644 --- a/test/js/third_party/socket.io/socket.io-handshake.test.ts +++ b/test/js/third_party/socket.io/socket.io-handshake.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { Server } from "socket.io"; import { describe, it, expect } from "bun:test"; import { getPort, success, fail } from "./support/util.ts"; diff --git a/test/js/third_party/socket.io/socket.io-messaging-many.test.ts b/test/js/third_party/socket.io/socket.io-messaging-many.test.ts index 5e9776468a..3729f63f67 100644 --- a/test/js/third_party/socket.io/socket.io-messaging-many.test.ts +++ b/test/js/third_party/socket.io/socket.io-messaging-many.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { Server } from "socket.io"; import { describe, it, expect } from "bun:test"; import { createClient, createPartialDone, success, fail, waitFor } from "./support/util"; diff --git a/test/js/third_party/socket.io/socket.io-middleware.test.ts b/test/js/third_party/socket.io/socket.io-middleware.test.ts index 705d6154b1..3a594307c9 100644 --- a/test/js/third_party/socket.io/socket.io-middleware.test.ts +++ b/test/js/third_party/socket.io/socket.io-middleware.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { Server, Socket } from "socket.io"; import { describe, it, expect } from "bun:test"; diff --git a/test/js/third_party/socket.io/socket.io-namespaces.test.ts b/test/js/third_party/socket.io/socket.io-namespaces.test.ts index 5dcbb68e08..c6730b7827 100644 --- a/test/js/third_party/socket.io/socket.io-namespaces.test.ts +++ b/test/js/third_party/socket.io/socket.io-namespaces.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, it, expect } from "bun:test"; import type { SocketId } from "socket.io-adapter"; import { Server, Namespace, Socket } from "socket.io"; diff --git a/test/js/third_party/socket.io/socket.io-server-attachment.test.ts b/test/js/third_party/socket.io/socket.io-server-attachment.test.ts index 9fcf3d93db..8d9d93d442 100644 --- a/test/js/third_party/socket.io/socket.io-server-attachment.test.ts +++ b/test/js/third_party/socket.io/socket.io-server-attachment.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { Server } from "socket.io"; import { createServer } from "http"; import request from "supertest"; diff --git a/test/js/third_party/socket.io/socket.io-socket-middleware.test.ts b/test/js/third_party/socket.io/socket.io-socket-middleware.test.ts index 4eea394918..9bfc223f5c 100644 --- a/test/js/third_party/socket.io/socket.io-socket-middleware.test.ts +++ b/test/js/third_party/socket.io/socket.io-socket-middleware.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing // TODO: uncomment when Blob bug in isBinary is fixed import { Server } from "socket.io"; diff --git a/test/js/third_party/socket.io/socket.io-socket-timeout.test.ts b/test/js/third_party/socket.io/socket.io-socket-timeout.test.ts index f781f6b92b..233d78eb3b 100644 --- a/test/js/third_party/socket.io/socket.io-socket-timeout.test.ts +++ b/test/js/third_party/socket.io/socket.io-socket-timeout.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { Server } from "socket.io"; import { describe, it, expect } from "bun:test"; diff --git a/test/js/third_party/socket.io/socket.io-utility-methods.test.ts b/test/js/third_party/socket.io/socket.io-utility-methods.test.ts index 584f567959..4e567c971c 100644 --- a/test/js/third_party/socket.io/socket.io-utility-methods.test.ts +++ b/test/js/third_party/socket.io/socket.io-utility-methods.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { createServer } from "http"; import { describe, it, expect, beforeEach, afterEach } from "bun:test"; import { io as ioc, Socket as ClientSocket } from "socket.io-client"; diff --git a/test/js/third_party/socket.io/socket.io.test.ts b/test/js/third_party/socket.io/socket.io.test.ts index 1a4cb7cbf7..0464561995 100644 --- a/test/js/third_party/socket.io/socket.io.test.ts +++ b/test/js/third_party/socket.io/socket.io.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, it, expect } from "bun:test"; import fs from "fs"; diff --git a/test/js/third_party/svelte/svelte.test.ts b/test/js/third_party/svelte/svelte.test.ts index 44e36cce27..e365f4c269 100644 --- a/test/js/third_party/svelte/svelte.test.ts +++ b/test/js/third_party/svelte/svelte.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, expect, it } from "bun:test"; import "./bun-loader-svelte"; diff --git a/test/js/third_party/webpack/webpack.test.ts b/test/js/third_party/webpack/webpack.test.ts index 294ce36e66..651bf6b0b2 100644 --- a/test/js/third_party/webpack/webpack.test.ts +++ b/test/js/third_party/webpack/webpack.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { bunExe, bunEnv } from "harness"; import { existsSync, promises } from "fs"; import { join } from "path"; diff --git a/test/js/third_party/yargs/yargs-cjs.test.js b/test/js/third_party/yargs/yargs-cjs.test.js index 06e4d9cb86..aa0580d215 100644 --- a/test/js/third_party/yargs/yargs-cjs.test.js +++ b/test/js/third_party/yargs/yargs-cjs.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing test("yargs/yargs works", () => { const yargs = require("yargs/yargs"); expect(yargs).toBeFunction(); diff --git a/test/js/web/abort/abort.test.ts b/test/js/web/abort/abort.test.ts index ef0b07a18d..fc4aa9abf4 100644 --- a/test/js/web/abort/abort.test.ts +++ b/test/js/web/abort/abort.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, test, expect } from "bun:test"; import { bunExe, bunEnv } from "harness"; import { writeFileSync } from "fs"; diff --git a/test/js/web/broadcastchannel/broadcast-channel.test.ts b/test/js/web/broadcastchannel/broadcast-channel.test.ts index 918bbd36b3..0b1682ef49 100644 --- a/test/js/web/broadcastchannel/broadcast-channel.test.ts +++ b/test/js/web/broadcastchannel/broadcast-channel.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing test("postMessage results in correct event", done => { let c1 = new BroadcastChannel("eventType"); let c2 = new BroadcastChannel("eventType"); diff --git a/test/js/web/console/console-log.test.ts b/test/js/web/console/console-log.test.ts index 98c8370def..87ac7e0476 100644 --- a/test/js/web/console/console-log.test.ts +++ b/test/js/web/console/console-log.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { file, spawn } from "bun"; import { expect, it } from "bun:test"; import { bunExe } from "harness"; diff --git a/test/js/web/console/console-timeLog.test.ts b/test/js/web/console/console-timeLog.test.ts index 81513ed112..1db7a21567 100644 --- a/test/js/web/console/console-timeLog.test.ts +++ b/test/js/web/console/console-timeLog.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { file, spawn } from "bun"; import { expect, it } from "bun:test"; import { bunExe, bunEnv } from "harness"; diff --git a/test/js/web/crypto/web-crypto.test.ts b/test/js/web/crypto/web-crypto.test.ts index e45dd37a05..2364986dc3 100644 --- a/test/js/web/crypto/web-crypto.test.ts +++ b/test/js/web/crypto/web-crypto.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { spawnSync } from "bun"; import { describe, expect, it } from "bun:test"; import { bunEnv, bunExe } from "harness"; diff --git a/test/js/web/encoding/text-decoder.test.js b/test/js/web/encoding/text-decoder.test.js index 3685a5f6da..c2645c3d4b 100644 --- a/test/js/web/encoding/text-decoder.test.js +++ b/test/js/web/encoding/text-decoder.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { expect, it, describe } from "bun:test"; import { gc as gcTrace, withoutAggressiveGC } from "harness"; diff --git a/test/js/web/encoding/text-encoder.test.js b/test/js/web/encoding/text-encoder.test.js index 78940a6eb7..4dc7a78c92 100644 --- a/test/js/web/encoding/text-encoder.test.js +++ b/test/js/web/encoding/text-encoder.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { expect, it, describe } from "bun:test"; import { gc as gcTrace, withoutAggressiveGC } from "harness"; diff --git a/test/js/web/fetch/body-stream.test.ts b/test/js/web/fetch/body-stream.test.ts index 8f76755289..bc695568a9 100644 --- a/test/js/web/fetch/body-stream.test.ts +++ b/test/js/web/fetch/body-stream.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing // @ts-nocheck import { gc, ServeOptions } from "bun"; import { afterAll, describe, expect, it, test } from "bun:test"; diff --git a/test/js/web/fetch/body.test.ts b/test/js/web/fetch/body.test.ts index 2b9b3e11d5..ff44d28500 100644 --- a/test/js/web/fetch/body.test.ts +++ b/test/js/web/fetch/body.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, test, expect } from "bun:test"; import { file, spawn, version, readableStreamToText } from "bun"; diff --git a/test/js/web/fetch/fetch-gzip.test.ts b/test/js/web/fetch/fetch-gzip.test.ts index 0569eaad84..2a8576736a 100644 --- a/test/js/web/fetch/fetch-gzip.test.ts +++ b/test/js/web/fetch/fetch-gzip.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { concatArrayBuffers, Socket, TCPSocketListener } from "bun"; import { it, expect } from "bun:test"; import { gcTick } from "harness"; diff --git a/test/js/web/fetch/fetch-leak.test.js b/test/js/web/fetch/fetch-leak.test.js index d296860ff0..b0aeac377b 100644 --- a/test/js/web/fetch/fetch-leak.test.js +++ b/test/js/web/fetch/fetch-leak.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { test, expect, describe } from "bun:test"; import { join } from "node:path"; import { bunEnv, bunExe } from "harness"; diff --git a/test/js/web/fetch/fetch.brotli.test.ts b/test/js/web/fetch/fetch.brotli.test.ts index 9358072b69..becf453902 100644 --- a/test/js/web/fetch/fetch.brotli.test.ts +++ b/test/js/web/fetch/fetch.brotli.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { test, expect } from "bun:test"; test("fetch brotli response works", async () => { diff --git a/test/js/web/fetch/fetch.stream.test.ts b/test/js/web/fetch/fetch.stream.test.ts index a5bc6e455a..ffdbdaa7a6 100644 --- a/test/js/web/fetch/fetch.stream.test.ts +++ b/test/js/web/fetch/fetch.stream.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { Socket, Server, TCPSocketListener } from "bun"; import { readFileSync } from "fs"; import { join } from "path"; diff --git a/test/js/web/fetch/fetch.test.ts b/test/js/web/fetch/fetch.test.ts index 6c7bb3f7ee..e309493c49 100644 --- a/test/js/web/fetch/fetch.test.ts +++ b/test/js/web/fetch/fetch.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { AnyFunction, serve, ServeOptions, Server, sleep, TCPSocketListener } from "bun"; import { afterAll, afterEach, beforeAll, describe, expect, it, beforeEach } from "bun:test"; import { chmodSync, mkdtempSync, readFileSync, realpathSync, rmSync, writeFileSync } from "fs"; diff --git a/test/js/web/fetch/fetch.tls.test.ts b/test/js/web/fetch/fetch.tls.test.ts index 15eb7acf69..d5708e2c5b 100644 --- a/test/js/web/fetch/fetch.tls.test.ts +++ b/test/js/web/fetch/fetch.tls.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { it, expect } from "bun:test"; import tls from "tls"; import { join } from "node:path"; diff --git a/test/js/web/fetch/fetch_headers.test.js b/test/js/web/fetch/fetch_headers.test.js index 7ee851bb06..400fe42047 100644 --- a/test/js/web/fetch/fetch_headers.test.js +++ b/test/js/web/fetch/fetch_headers.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, it, expect, beforeAll, afterAll } from "bun:test"; let url = `http://localhost:0`; let server; diff --git a/test/js/web/html/FormData.test.ts b/test/js/web/html/FormData.test.ts index 5e4861bc80..e1571ab16c 100644 --- a/test/js/web/html/FormData.test.ts +++ b/test/js/web/html/FormData.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { afterAll, beforeAll, describe, expect, it, test } from "bun:test"; import fs, { chmodSync, unlinkSync } from "fs"; import { gc, withoutAggressiveGC } from "harness"; diff --git a/test/js/web/streams/streams.test.js b/test/js/web/streams/streams.test.js index 7359009b79..35db7c02c4 100644 --- a/test/js/web/streams/streams.test.js +++ b/test/js/web/streams/streams.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { file, readableStreamToArrayBuffer, readableStreamToArray, readableStreamToText, ArrayBufferSink } from "bun"; import { expect, it, beforeEach, afterEach, describe, test } from "bun:test"; import { mkfifo } from "mkfifo"; diff --git a/test/js/web/timers/setImmediate.test.js b/test/js/web/timers/setImmediate.test.js index 23099d4d0f..9d32397fb7 100644 --- a/test/js/web/timers/setImmediate.test.js +++ b/test/js/web/timers/setImmediate.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { it, expect } from "bun:test"; import { bunExe, bunEnv } from "harness"; import path from "path"; diff --git a/test/js/web/timers/setImmediate.test.ts b/test/js/web/timers/setImmediate.test.ts index a52d315b09..34d0506cc5 100644 --- a/test/js/web/timers/setImmediate.test.ts +++ b/test/js/web/timers/setImmediate.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { test, expect } from "bun:test"; test("setImmediate doesn't block the event loop", async () => { diff --git a/test/js/web/timers/setInterval.test.js b/test/js/web/timers/setInterval.test.js index b6cdbe2e5f..ec1911dba0 100644 --- a/test/js/web/timers/setInterval.test.js +++ b/test/js/web/timers/setInterval.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { it, expect } from "bun:test"; import { join } from "path"; import "harness"; diff --git a/test/js/web/timers/setTimeout.test.js b/test/js/web/timers/setTimeout.test.js index 2e14f74987..3514f7889b 100644 --- a/test/js/web/timers/setTimeout.test.js +++ b/test/js/web/timers/setTimeout.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { spawnSync } from "bun"; import { it, expect } from "bun:test"; import { bunEnv, bunExe } from "harness"; diff --git a/test/js/web/web-globals.test.js b/test/js/web/web-globals.test.js index ee835db613..8151d5910a 100644 --- a/test/js/web/web-globals.test.js +++ b/test/js/web/web-globals.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { spawn } from "bun"; import { expect, it, test } from "bun:test"; import { bunEnv, bunExe, withoutAggressiveGC } from "harness"; diff --git a/test/js/web/websocket/websocket-client.test.ts b/test/js/web/websocket/websocket-client.test.ts index 470fa71c09..89fea92e1d 100644 --- a/test/js/web/websocket/websocket-client.test.ts +++ b/test/js/web/websocket/websocket-client.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, it, expect, beforeEach, afterEach } from "bun:test"; import type { Subprocess } from "bun"; import { spawn } from "bun"; diff --git a/test/js/web/websocket/websocket-upgrade.test.ts b/test/js/web/websocket/websocket-upgrade.test.ts index 1b6e2f5d7c..5e79368fa7 100644 --- a/test/js/web/websocket/websocket-upgrade.test.ts +++ b/test/js/web/websocket/websocket-upgrade.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { serve } from "bun"; import { describe, test, expect } from "bun:test"; diff --git a/test/js/web/websocket/websocket.test.js b/test/js/web/websocket/websocket.test.js index aab5bdc788..ff3fd9014b 100644 --- a/test/js/web/websocket/websocket.test.js +++ b/test/js/web/websocket/websocket.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, it, expect } from "bun:test"; import { bunExe, bunEnv, gc } from "harness"; import { readFileSync } from "fs"; diff --git a/test/js/web/workers/message-channel.test.ts b/test/js/web/workers/message-channel.test.ts index 033343b34f..092d8f31b0 100644 --- a/test/js/web/workers/message-channel.test.ts +++ b/test/js/web/workers/message-channel.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing test("simple usage", done => { const channel = new MessageChannel(); const port1 = channel.port1; diff --git a/test/js/web/workers/worker.test.ts b/test/js/web/workers/worker.test.ts index ab22a0fe14..17e40bae3d 100644 --- a/test/js/web/workers/worker.test.ts +++ b/test/js/web/workers/worker.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, expect, test } from "bun:test"; import { bunEnv, bunExe } from "harness"; import path from "path"; diff --git a/test/js/workerd/html-rewriter.test.js b/test/js/workerd/html-rewriter.test.js index 99c484a256..e1d7a7a552 100644 --- a/test/js/workerd/html-rewriter.test.js +++ b/test/js/workerd/html-rewriter.test.js @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, it, expect, beforeAll, afterAll } from "bun:test"; import { gcTick } from "harness"; import path from "path"; diff --git a/test/napi/napi.test.ts b/test/napi/napi.test.ts index f554cb5029..8b66c3e563 100644 --- a/test/napi/napi.test.ts +++ b/test/napi/napi.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { it, expect, test, beforeAll, describe } from "bun:test"; import { bunExe, bunEnv } from "harness"; import { spawnSync } from "bun"; diff --git a/test/package.json b/test/package.json index db8cb5f31e..ce48311809 100644 --- a/test/package.json +++ b/test/package.json @@ -10,7 +10,7 @@ "dependencies": { "@grpc/grpc-js": "1.9.9", "@grpc/proto-loader": "0.7.10", - "@prisma/client": "5.1.1", + "@prisma/client": "5.8.0", "@resvg/resvg-js": "2.4.1", "@swc/core": "1.3.38", "body-parser": "1.20.2", @@ -20,7 +20,6 @@ "esbuild": "0.18.6", "express": "4.18.2", "fast-glob": "3.3.1", - "fsevents": "2.3.2", "iconv-lite": "0.6.3", "jest-extended": "4.0.0", "jsonwebtoken": "9.0.2", diff --git a/test/regression/issue/00631.test.ts b/test/regression/issue/00631.test.ts index c9303b5c17..dcdf0d15ab 100644 --- a/test/regression/issue/00631.test.ts +++ b/test/regression/issue/00631.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { expect, it } from "bun:test"; import { bunExe, bunEnv } from "../../harness.js"; import { mkdirSync, rmSync, writeFileSync, readFileSync, mkdtempSync } from "fs"; diff --git a/test/regression/issue/02499.test.ts b/test/regression/issue/02499.test.ts index f1ee1da80a..1b74e64480 100644 --- a/test/regression/issue/02499.test.ts +++ b/test/regression/issue/02499.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { expect, it } from "bun:test"; import { bunExe, bunEnv } from "../../harness.js"; import { mkdirSync, rmSync, writeFileSync, readFileSync, mkdtempSync } from "fs"; diff --git a/test/regression/issue/03216.test.ts b/test/regression/issue/03216.test.ts index 5eced0bf9e..f7ee8d0794 100644 --- a/test/regression/issue/03216.test.ts +++ b/test/regression/issue/03216.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing // https://github.com/oven-sh/bun/issues/3216 import { test, expect } from "bun:test"; import { tmpdir } from "os"; diff --git a/test/regression/issue/03830.test.ts b/test/regression/issue/03830.test.ts index 24be68313d..eaa21b7e5e 100644 --- a/test/regression/issue/03830.test.ts +++ b/test/regression/issue/03830.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing // test/regression/issue/03830.test.ts import { it, expect } from "bun:test"; diff --git a/test/regression/issue/04011.test.ts b/test/regression/issue/04011.test.ts index a3db4270dd..ed14fdd83d 100644 --- a/test/regression/issue/04011.test.ts +++ b/test/regression/issue/04011.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { expect, test } from "bun:test"; import { bunEnv, bunExe } from "harness"; diff --git a/test/regression/issue/04893.test.ts b/test/regression/issue/04893.test.ts index 43850693be..25a779d38d 100644 --- a/test/regression/issue/04893.test.ts +++ b/test/regression/issue/04893.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { bunEnv, bunExe } from "harness"; import { mkdirSync, rmSync, writeFileSync, readFileSync, mkdtempSync } from "fs"; import { tmpdir } from "os"; diff --git a/test/regression/issue/06443.test.ts b/test/regression/issue/06443.test.ts index 8d58da2cca..7e4743612f 100644 --- a/test/regression/issue/06443.test.ts +++ b/test/regression/issue/06443.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { describe, test, expect } from "bun:test"; import { serve, file } from "bun"; diff --git a/test/regression/issue/07261.test.ts b/test/regression/issue/07261.test.ts index fb092f38e3..4a32145b8d 100644 --- a/test/regression/issue/07261.test.ts +++ b/test/regression/issue/07261.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { bunEnv, bunExe } from "harness"; import { mkdirSync, rmSync, writeFileSync, mkdtempSync } from "fs"; import { tmpdir } from "os"; diff --git a/test/regression/issue/07500.test.ts b/test/regression/issue/07500.test.ts index 3d904d0d33..d7434d40d7 100644 --- a/test/regression/issue/07500.test.ts +++ b/test/regression/issue/07500.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { test, expect } from "bun:test"; import { bunEnv, bunExe } from "harness"; import { tmpdir } from "os"; diff --git a/test/regression/issue/07740.test.ts b/test/regression/issue/07740.test.ts index b79132ba9c..4bab719c28 100644 --- a/test/regression/issue/07740.test.ts +++ b/test/regression/issue/07740.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { bunEnv } from "harness"; import { bunExe } from "harness"; import { tempDirWithFiles } from "harness"; diff --git a/test/transpiler/decorator-metadata.test.ts b/test/transpiler/decorator-metadata.test.ts index 9cc8cc7186..e03a7a8e6c 100644 --- a/test/transpiler/decorator-metadata.test.ts +++ b/test/transpiler/decorator-metadata.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import "reflect-metadata"; describe("decorator metadata", () => { diff --git a/test/transpiler/decorators.test.ts b/test/transpiler/decorators.test.ts index cb328029bb..8d09b5150b 100644 --- a/test/transpiler/decorators.test.ts +++ b/test/transpiler/decorators.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing // @ts-nocheck import { test, expect, describe } from "bun:test"; import DecoratedClass from "./decorator-export-default-class-fixture"; diff --git a/test/transpiler/property.test.ts b/test/transpiler/property.test.ts index df02790da4..5ab2ba3467 100644 --- a/test/transpiler/property.test.ts +++ b/test/transpiler/property.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { test, expect } from "bun:test"; import { bunEnv, bunExe } from "harness"; diff --git a/test/transpiler/runtime-transpiler.test.ts b/test/transpiler/runtime-transpiler.test.ts index 7573fd1a11..653228cf60 100644 --- a/test/transpiler/runtime-transpiler.test.ts +++ b/test/transpiler/runtime-transpiler.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { beforeEach, describe, expect, test } from "bun:test"; import { bunEnv, bunExe } from "harness"; diff --git a/test/transpiler/template-literal.test.ts b/test/transpiler/template-literal.test.ts index a0fd2170f3..9c390afe9e 100644 --- a/test/transpiler/template-literal.test.ts +++ b/test/transpiler/template-literal.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { test, expect } from "bun:test"; import { bunEnv, bunExe } from "harness"; import { join } from "path"; diff --git a/test/transpiler/transpiler-stack-overflow.test.ts b/test/transpiler/transpiler-stack-overflow.test.ts index 1501292b2f..7b48668bec 100644 --- a/test/transpiler/transpiler-stack-overflow.test.ts +++ b/test/transpiler/transpiler-stack-overflow.test.ts @@ -1,3 +1,4 @@ +// @known-failing-on-windows: 1 failing import { test, expect } from "bun:test"; import { writeFileSync, mkdirSync } from "node:fs"; import { join } from "path";