Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

357
Views
Implement @emotion/babel-plugin with jest

In our project we got the @emotion/babel-plugin working, but we just can't get it to work with jest, our jest-preprocess file looks like the following:

const babelJest = require('babel-jest');

const babelOptions = {
  presets: ['babel-preset-gatsby'],
  plugins: ['@emotion'],
};

module.exports = babelJest.default.createTransformer(babelOptions);

When we run the tests we just get:

Component selectors can only be used in conjunction with @emotion/babel-plugin.
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Have you tried using:

// jest-preprocess.js
const babelJest = require('babel-jest').default;

const babelOptions = {
  presets: [
    "babel-preset-gatsby",
    "@emotion/babel-preset-css-prop",
  ],
  plugins: ["emotion"],
}
module.exports = babelJest.createTransformer(babelOptions)
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!