Need help with jest
See original GitHub issueHi! When I run test I recive this error:
FAIL src/Button/tests/Button.test.tsx
● Test suite failed to run
`css` template literal evaluated at runtime!
6 | };
7 |
> 8 | const styles = css`
| ^
9 | .button{
10 | color: red;
11 |
at css (node_modules/astroturf/runtime/styled.js:98:9)
at Object.<anonymous> (src/Button/Button.tsx:8:13)
at Object.<anonymous> (src/Button/tests/Button.test.tsx:3:1)
I think I need to configure transform prop in jest config or modify babel config with test env, but I don’t know exactly how. Any ideas?
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
Need help? - Jest
Need help ? Jest is worked on by a team of volunteers in their spare time. You can find out ways to talk...
Read more >Jest Tutorial - JavaScript Unit Testing Using Jest Framework
In this Jest tutorial, we will learn about various Jest features, Jest matchers and how to use Jest framework for JavaScript Unit Testing....
Read more >What Is Jest – A Tutorial on How to Use Jest - LambdaTest
Jest comes with all of the features that are required in a modern testing framework. Built-in modules provide good support for plugins, and...
Read more >Jest Tutorial for Beginners: Getting Started With JavaScript ...
Jest is a JavaScript test runner, that is, a JavaScript library for creating, running, and structuring tests. Jest ships as an NPM package,...
Read more >Jest Testing Tutorial: 5 Easy Steps - Testim Blog
In summary, this means that Jest offers a test runner, assertion library, CLI tool, and great support for different mocking techniques.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Should be
export const css = () => ({})
;you’re reading my mind 😄
inline
option was the first thing i thought of but then backed off so as not to drag css-handling into the mixi think this might be a good candidate for
astroturf-jest
transform though