From 3ae2b4dab4d2fe1a2cba37f1832541fb938909f3 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Thu, 24 Mar 2022 16:34:15 +0530 Subject: [PATCH] Use two url() in test --- scripts/postcss/tests/css-url-to-variables.test.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/postcss/tests/css-url-to-variables.test.js b/scripts/postcss/tests/css-url-to-variables.test.js index 36a38345..645b1775 100644 --- a/scripts/postcss/tests/css-url-to-variables.test.js +++ b/scripts/postcss/tests/css-url-to-variables.test.js @@ -31,14 +31,21 @@ module.exports.tests = function tests() { "url is replaced with variable": async (assert) => { const inputCSS = `div { background: no-repeat center/80% url("../img/image.png"); + } + button { + background: url("/home/foo/bar/cool.jpg"); }`; const outputCSS = `div { background: no-repeat center/80% url(var(--icon-url-0)); + } + button { + background: url(var(--icon-url-1)); }`+ ` :root { --icon-url-0: "../img/image.png"; + --icon-url-1: "/home/foo/bar/cool.jpg"; } `; await run( inputCSS, outputCSS, { }, assert);