Closed jhjaylim closed 6 years ago
@jhjaylim you're missing the import for your JSX function:
import { createElement }, React from 'react';
Either do that, or configure your JSX pragma to be "React.createElement"
:
/** @jsx React.createElement */
I have been using Preact with alias. So I am doing
import React from "react"
The issue I have is that when I test with jest and enzyme, it gives me
createElement() not found error
When I use preact-compat-enzyme, then it gives meh not defined
It seems like testing tools are confused about what to do.
Is there a solution for this? Most of client code is already written, so If there is no simple solution (meaning some sort of plugins) ?