jasmine / jasmine-browser-runner

Serve and run your Jasmine specs in a browser
49 stars 23 forks source link

Question: Is there an option to override only files ending in `.mjs` to be treated as JS modules? #22

Closed nathan-barrett closed 1 year ago

nathan-barrett commented 2 years ago

Hello!

Just wondering if there would be a property in the config that I can set to treat certain files as es modules.

For example for mozilla.org's repo - we name JS modules with *.es6.js. If you feel like this could be a helpful change, I would also be more than happy to make a PR for this - if someone would be able to point me in the correct direction? Thanks!

sgravrock commented 2 years ago

There's nothing that does that now, but a PR would be welcome. The touch points that I'm aware of are the spec file filtering in server.js and the extension check in run.html.ejs. You can also find relevant specs by searching for .mjs.