karma-runner / karma-commonjs

A Karma plugin. Test CommonJS modules.
MIT License
73 stars 30 forks source link

Add ability to require any file extension #36

Closed jhnstn closed 9 years ago

jhnstn commented 9 years ago

Adds a configuration property, fileExtensions, that allows require to source files with file extensions other than .js or .json. This is useful when using karma preprocessors that may not change the file path names but do generate valid JS.

pkozlowski-opensource commented 9 years ago

@jhnstn thnx for the PR - I can see what you are getting at but I think that the underlying issue should be either fixed in an upstream plugin that doesn't rename files properly. Alternatively once could write a generic rename Karma plugin that could co-operate with other plugins that don't rename things. In any case I think that this fix is too specific and doesn't really belong here.