Move some bundle test code into tests/ (#12577)

This commit is contained in:
fisker Cheung authored and GitHub committed 2022-04-02 16:14:32 +08:00
1 parent 32480b621b
commit afd0220dea
4 files changed
+59 -40

No files matched your search

-12
View File
@@ -63,8 +63,6 @@ const clear = () => {
};
async function createBundle(bundleConfig, options) {
const { target } = bundleConfig;
try {
for await (const {
name,
@@ -89,16 +87,6 @@ async function createBundle(bundleConfig, options) {
continue;
}
// Files including U+FFEE can't load in Chrome Extension
// `prettier-chrome-extension` https://github.com/prettier/prettier-chrome-extension
// details https://github.com/prettier/prettier/pull/8534
if (target === "universal") {
const content = await fs.readFile(absolutePath, "utf8");
if (content.includes("\ufffe")) {
throw new Error("Bundled umd file should not have U+FFFE character.");
}
}
const sizeMessages = [];
if (options.printSize) {