@@ -10,8 +10,8 @@ const {trim} = require('../lib/util');
1010const { rebaseToCache} = require ( '../lib/higher-order' ) ;
1111const {
1212 all, testDefault, testSilent, testKeepQuery, testAbsolute, testAttempts, testEngineFailInitialisation,
13- testEngineFailProcessing, testIncludeRoot, testFail, testNonFunctionJoin , testWrongArityJoin , testNonStringRoot ,
14- testNonExistentRoot
13+ testEngineFailProcessing, testIncludeRoot, testFail, testNonFunctionJoin1 , testWrongArityJoin1 , testNonFunctionJoin2 ,
14+ testWrongArityJoin2 , testNonStringRoot , testNonExistentRoot
1515} = require ( './common/test' ) ;
1616const { buildDevNormal, buildProdNormal} = require ( './common/exec' ) ;
1717const { assertCssContent} = require ( '../lib/assert' ) ;
@@ -246,19 +246,35 @@ module.exports = test(
246246 )
247247 )
248248 ) ,
249- testNonFunctionJoin (
249+ testNonFunctionJoin1 (
250250 all ( testDefault , testSilent ) (
251251 all ( buildDevNormal , buildProdNormal ) (
252252 assertWebpackNotOk ,
253253 assertMisconfigError ( '"join" option must be a Function' )
254254 )
255255 )
256256 ) ,
257- testWrongArityJoin (
257+ testWrongArityJoin1 (
258258 all ( testDefault , testSilent ) (
259259 all ( buildDevNormal , buildProdNormal ) (
260260 assertWebpackNotOk ,
261- assertMisconfigError ( '"join" Function must take exactly 1 arguments (options hash)' )
261+ assertMisconfigError ( '"join" Function must take exactly 2 arguments (options, loader)' )
262+ )
263+ )
264+ ) ,
265+ testNonFunctionJoin2 (
266+ all ( testDefault , testSilent ) (
267+ all ( buildDevNormal , buildProdNormal ) (
268+ assertWebpackNotOk ,
269+ assertMisconfigError ( '"join" option must itself return a Function when it is called' )
270+ )
271+ )
272+ ) ,
273+ testWrongArityJoin2 (
274+ all ( testDefault , testSilent ) (
275+ all ( buildDevNormal , buildProdNormal ) (
276+ assertWebpackNotOk ,
277+ assertMisconfigError ( '"join" Function must create a function that takes exactly 1 arguments (item)' )
262278 )
263279 )
264280 ) ,
0 commit comments