Skip to content

Commit

Permalink
add test for supplying functions option as a function of loaderContext
Browse files Browse the repository at this point in the history
  • Loading branch information
lunelson committed Dec 16, 2018
1 parent 2ea4635 commit 53b60cb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,13 @@ implementations.forEach((implementation) => {
execTest('custom-functions', {
functions: customFunctions(implementation),
}));
it('should expose custom functions if the option is a function', () =>
execTest('custom-functions', {
functions: (loaderContext) => {
should.exist(loaderContext);
return customFunctions(implementation);
},
}));
});
describe('prepending data', () => {
it('should extend the data option if present and it is string', () =>
Expand Down

0 comments on commit 53b60cb

Please sign in to comment.