Skip to content

Material UI injects CSS into JSDOM - "Could not parse CSS stylesheet" #939

Answered by Flixbox
Flixbox asked this question in Q&A
Discussion options

You must be logged in to vote

A wonderfully simple solution for y'all.

    const ignoredMessages = ['Could not parse CSS stylesheet']

    vi.spyOn(console, 'error').mockImplementation(message => {
        if (ignoredMessages.some(v => message.includes(v))) {
            return
        }
        console.info(message)
    })

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Flixbox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant