Skip to content

Commit

Permalink
test: interpolateName util (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilebottnawi authored Dec 27, 2018
1 parent f8a71f4 commit d69c303
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/interpolateName.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit d69c303

Please sign in to comment.