Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add test for flattened 'files' option and clean up code
- This feature was added in pull #150 without a test. It now has a test. - The code was applying the flatten operation to all input, but should really only be applied to `options.files`, not to this.files from Grunt, which is already processed. - The code was checking `data.files` but using `this.files`. This is working correctly, but looks confusing to a reader. `data.files` is the raw input, and `this.files` is the version of that input after processing by Grunt. To improve readability, use that same reference for the check as well. In order to keep behaviour identical, use the array's length property to determine whether it was set. The files array is always available from Grunt, and can be safely accessed without additional check. This is covered by the karma:config test case, which specifies neither options.files nor data.files. Ref #150. Closes #236.
- Loading branch information