Skip to content

happy-dom integration does not uses environmentOptions #3903

@raulfdm

Description

@raulfdm

Describe the bug

I notice that while using environment: 'happy-dom', the values passed via environmentOptions are not being forward, forcing the users to define settings after it's being already initialized (e.g., via setupFiles)

Reproduction

https://stackblitz.com/edit/vitest-dev-vitest-v3zosm?file=vite.config.ts&initialPath=__vitest__/

System Info

System:
    OS: macOS 13.5
    CPU: (8) arm64 Apple M1 Pro
    Memory: 48.19 MB / 16.00 GB
    Shell: 5.9 - /opt/homebrew/bin/zsh
  Binaries:
    Node: 16.20.1 - ~/.volta/tools/image/node/16.20.1/bin/node
    npm: 8.19.4 - ~/.volta/tools/image/node/16.20.1/bin/npm
    pnpm: 8.6.6 - ~/.volta/tools/image/pnpm/8.6.6/bin/pnpm
  Browsers:
    Brave Browser: 115.1.56.14
    Chrome: 115.0.5790.114
    Edge: 115.0.1901.188
    Safari: 16.6
  npmPackages:
    @vitejs/plugin-react-swc: 3.3.2 => 3.3.2 
    @vitest/coverage-c8: 0.31.4 => 0.31.4 
    vite: 4.4.8 => 4.4.8 
    vitest: 0.31.4 => 0.31.4

Used Package Manager

pnpm

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions