karma-runner/karma

File serving should have case-insensitive option

開放

#1,722 建立於 2015年11月24日

 (5 則留言) (0 個反應) (0 位負責人)JavaScript (1,703 個分叉)batch import
discusshelp wantedtype: feature

倉庫指標

星標
 (11,918 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

When working on Windows, most files can be accessed in a case-insensitive fashion. This can result in builds working (files are found by the operating system, and compiled into assets), but tests not working unless every reference to the file is the same casing. This is a problem, especially using ES6 module syntax.

Can an option be inserted which would allow Karma to match file names with a custom resolver function? Right now, there's a === going on, to see if a file exists in Karma's directory. I have attempted to resolve this via proxies, but have not had much luck since it doesn't really seem to be the intended use case.

I imagine the change would be very small. This is the line of code which would be affected (https://github.com/karma-runner/karma/blob/master/lib/middleware/source_files.js#L9), I'd like to make that configurable. Is this aligned with the intent of how Karma should work?

貢獻者指南