embroider-build / content-tag

A rust program that uses a fork of SWC to parse and transform Javascript containing the content-tag proposal
MIT License
8 stars 7 forks source link

Simplify testing situation to assure import and require works #59

Closed NullVoxPopuli closed 8 months ago

NullVoxPopuli commented 9 months ago

Now we don't have duplication.

in a previous attempt The only thing we need to remember is that we can't directly `require` or `import` in module-space in the tests themselves :sweat_smile: ![image](https://github.com/embroider-build/content-tag/assets/199018/f4859249-25d7-49ae-88b1-e4d9f5824420)
ef4 commented 8 months ago

I don't think this is worth it. There's no reason to think the details of the API would be different between import and require. It's enough to write the tests one way (probably import) and then have a single test that does a require and invokes one of the functions to make sure it's really there.

mansona commented 8 months ago

I don't see the cjs test running in https://github.com/embroider-build/content-tag/actions/runs/7604656450/job/20707813134?pr=59 🤔

NullVoxPopuli commented 8 months ago

it's sorted