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

captureStream mocked? #81

Open
lr-mjaouen opened this issue Apr 8, 2021 · 2 comments
Open

captureStream mocked? #81

lr-mjaouen opened this issue Apr 8, 2021 · 2 comments

Comments

@lr-mjaouen
Copy link

lr-mjaouen commented Apr 8, 2021

Hello,

I don't see any trace of captureStream or did I miss something?
Or you don't intend to support drafts? (support is at 92.59%)
https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/captureStream
([canvas.captureStream is not a function])
Thank you.

@lr-mjaouen
Copy link
Author

lr-mjaouen commented Apr 8, 2021

(in complement & as a temp solution):

beforeEach(() => {
    const createElement = document.createElement.bind(document);
    document.createElement = (tagName: any) => {
        if (tagName === 'canvas') {
            const element = createElement(tagName);
            element.captureStream = jest.fn();
            return element;
        }
        return createElement(tagName);
    };
});

@gavrilikhin-d
Copy link

Still isn't fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants