From da9473425c6276132a1fa891b106acef054d2229 Mon Sep 17 00:00:00 2001 From: evilebottnawi Date: Thu, 27 Dec 2018 13:11:51 +0300 Subject: [PATCH] test: `interpolateName` util --- test/interpolateName.test.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/interpolateName.test.js b/test/interpolateName.test.js index 00c912d..05b59f7 100644 --- a/test/interpolateName.test.js +++ b/test/interpolateName.test.js @@ -106,6 +106,24 @@ describe('interpolateName()', () => { 'test content', 'modal__modalTitle___1eeb', ], + [ + '/lib/components/modal/modal.css', + '[name]__modalTitle___[sha1:contenthash:hex:4]', + 'test content', + 'modal__modalTitle___1eeb', + ], + [ + '/lib/components/modal/modal.css', + '[name].[md5:hash:base64:20].[ext]', + 'test content', + 'modal.1n8osQznuT8jOAwdzg_n.css', + ], + [ + '/lib/components/modal/modal.css', + '[name].[md5:contenthash:base64:20].[ext]', + 'test content', + 'modal.1n8osQznuT8jOAwdzg_n.css', + ], ].forEach((test) => { it('should interpolate ' + test[0] + ' ' + test[1], () => { const interpolatedName = loaderUtils.interpolateName(