fix: 统一小程序按钮契约并补齐模板图标
This commit is contained in:
1 parent
07629a4596
commit
3330b536dc
9 files changed
+118
-10
No files matched your search
@@ -25,7 +25,19 @@ for (const key of templateKeys)
|
||||
for (const page of config.pages)
|
||||
for (const ext of ["js", "wxml", "json"])
|
||||
assert.ok(fs.existsSync(path.join(base, "weapp", `${page}.${ext}`)), `${page}.${ext}`);
|
||||
assert.ok(fs.readFileSync(path.join(base, "h5/index.html"), "utf8").includes('type="module"'));
|
||||
if (fs.existsSync(path.join(base, "h5/index.html")))
|
||||
assert.ok(
|
||||
fs.readFileSync(path.join(base, "h5/index.html"), "utf8").includes('type="module"'),
|
||||
);
|
||||
assert.ok(fs.existsSync(path.join(base, "weapp/project.config.json")));
|
||||
assert.ok(fs.readFileSync(path.join(base, "weapp/common.wxss"), "utf8").length > 1000);
|
||||
const weappStyles = fs.readFileSync(path.join(base, "weapp/common.wxss"), "utf8");
|
||||
const appStyles = fs.readFileSync(path.join(base, "weapp/app-origin.wxss"), "utf8");
|
||||
assert.ok(weappStyles.length > 1000);
|
||||
assert.match(appStyles, /(^|})button\{/);
|
||||
assert.match(appStyles, /--taro-button-height:\s*88rpx/);
|
||||
assert.match(
|
||||
appStyles,
|
||||
/display:flex;align-items:center;justify-content:center;width:100%;min-height:var\(--taro-button-height\)/,
|
||||
);
|
||||
assert.doesNotMatch(appStyles, /(^|})\.h5-button\{/);
|
||||
});
|
||||
Reference in new issue
Block a user