From f290f67157cd5bd14ee97cfb7c1f9f75b51c6ff1 Mon Sep 17 00:00:00 2001 From: JiM-W <550116990@qq.com> Date: Fri, 22 Nov 2019 15:33:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8D=95=E5=85=83=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test/parser-test/miniapp.test.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/chameleon-css-loader/test/parser-test/miniapp.test.js b/packages/chameleon-css-loader/test/parser-test/miniapp.test.js index d9a1ea63d..9c925d911 100644 --- a/packages/chameleon-css-loader/test/parser-test/miniapp.test.js +++ b/packages/chameleon-css-loader/test/parser-test/miniapp.test.js @@ -4,7 +4,17 @@ const expect = require('chai').expect; let source = `body {width:100cpx;font-size:26px;/* height:200px; */}`; describe('parse/miniapp', function() { it('parse cssstyle px to rpx but leave comment in style alone', function() { - let result = parseCss(source); + let result = parseCss(source,{ + cmlType:'alipay', + filePath:"chameleon-runtime/src/platform/alipay/style/index.css" + }); + expect(/100rpx/.test(result)).to.be.ok; + }) + it('parse cssstyle px to rpx but leave comment in style alone', function() { + let result = parseCss(source,{ + cmlType:'wx', + filePath:"chameleon-runtime/src/platform/alipay/style/index.css" + }); expect(/100rpx/.test(result)).to.be.ok; }) })