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

186
Views
Test code with automatically replaced strings

I have JS & CSS files where a constant is replaced when the code is transformed (using Rollup in my case but the replacement could have been done in other ways also for the purpose of this question).

My constant {{PREFIX}} is being replaced with the string wx-.

For example, a CSS file can have such selector:

.{{PREFIX}}foo{ ... }

And a JS file:

export const NAMESPACE = '{{PREFIX}}foo';

Jest does not understand this obviously, and I am unsure how to process the files before the tests run, so the strings will be replaced, allowing Jest to run on valid code.

about 4 years ago · Juan Pablo Isaza
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!