Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not implemented: HTMLCanvasElement.prototype.getContext #3025

Closed
6 tasks done
RamonPessoa opened this issue Mar 17, 2023 · 2 comments
Closed
6 tasks done

Not implemented: HTMLCanvasElement.prototype.getContext #3025

RamonPessoa opened this issue Mar 17, 2023 · 2 comments

Comments

@RamonPessoa
Copy link

Describe the bug

I have a component that uses the canvas html tag, and when I try to run tests on it I get the following error:

Not implemented: HTMLCanvasElement.prototype.getContext (without installing the canvas npm package)

and if i install it I get another error:

Module did not self-register

Reproduction

use html canvas tag on a component and try to test the component with vitest

System Info

System:
    OS: Linux 5.17 Pop!_OS 20.04 LTS
    CPU: (12) x64 AMD Ryzen 5 5600X 6-Core Processor
    Memory: 19.96 GB / 31.31 GB
    Container: Yes
    Shell: 5.8 - /usr/bin/zsh
  Binaries:
    Node: 16.19.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.19.3 - /usr/local/bin/npm
  Browsers:
    Chrome: 109.0.5414.74
    Firefox: 108.0.2
  npmPackages:
    @vitejs/plugin-react: 1.3.2 => 1.3.2 
    vite: 2.6.13 => 2.6.13 
    vitest: ^0.29.2 => 0.29.2

Used Package Manager

yarn

Validations

@sheremet-va
Copy link
Member

See: #740

Run with --no-threads

@sheremet-va sheremet-va closed this as not planned Won't fix, can't repro, duplicate, stale Mar 17, 2023
@zaalbarxx
Copy link

@sheremet-va Is this really the only possible option ? I assume that --no-threads make everything work with single thread making all the tests being much slower to process. I guess it is possible to somehow adress this since with Jest it does seem to work properly ?

@github-actions github-actions bot locked and limited conversation to collaborators Jun 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants