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.