提交 f290f671 编写于 作者: J JiM-W

增加单元测试

上级 9728bc41
......@@ -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;
})
})
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册