Conversation
✅ Deploy Preview for effortless-malabi-1c3e77 ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
jest.js
Outdated
| @@ -0,0 +1,8 @@ | |||
| const swcJest = require("@swc/jest"); | |||
| const { config } = require("./lib/swc"); | |||
There was a problem hiding this comment.
The tests do not rely on lib currently, they rely on src. What happens if lib isn't present, will the tests require compilation now?
There was a problem hiding this comment.
I'd been using the test command which had been compiling before I realized that command was intended for the pipeline. This is a tricky one because ideally the register hook and the transformer share a config. However, if I convert them to ts files and move them to the top level then the TypeScript will generate a similar directory structure (files in src go to lib/src instead of just lib).
The simplest path, which is mentioned below, is to move the config to top level and make it a js file.
This allows consumers to use
functionless/jestas a jest transformer.Also includes changes to merge in the behavior from
hook.jsso that the latest SQS feature will work for consumers.