test(oxfmt): stop counting both-error conformance cases as passed (#27826)

- Exclude Prettier's `_errors_/` and `range/` fixtures from `js-in-vue`
- Rename `issue-19667.ts` to `.tsx` so it parses
- Treat both sides failing to parse as a failure
This commit is contained in:
leaysgur committed 2026-10-16 12:16:17 +00:00
1 parent 03b3f6d8ca
commit 7bc0c0469e
3 files changed
+10 -4

No files matched your search

+8 -2
View File
@@ -44,7 +44,12 @@ const categories: Category[] = [
{
name: "js-in-vue",
sources: [
{ dir: join(EXTERNALS_DIR, "prettier"), ext: ".vue" },
{
dir: join(EXTERNALS_DIR, "prettier"),
ext: ".vue",
// Parser error messages and range formatting are not formatter concerns
excludes: ["/_errors_/", "vue/range/"],
},
{ dir: join(EXTERNALS_DIR, "vue-vben-admin"), ext: ".vue" },
{ dir: join(FIXTURES_DIR, "edge-cases", "js-in-vue") },
],
@@ -381,7 +386,8 @@ async function runCategory(category: Category, fixtures: Fixture[]): Promise<Cat
options,
);
if (oxfmtResult === prettierResult) {
// Both failing to parse is not a pass, the fixture exercised nothing
if (oxfmtResult === prettierResult && oxfmtResult !== "ERROR") {
passed++;
} else {
failures.push({
@@ -1,6 +1,6 @@
## js-in-vue
### Option 1: 424/427 (99.30%)
### Option 1: 421/424 (99.29%)
```json
{"printWidth":80}
@@ -13,7 +13,7 @@
- [externals/vue-vben-admin/effects/common-ui/src/components/api-component/api-component.vue](diffs/js-in-vue/externals__vue-vben-admin__effects__common-ui__src__components__api-component__api-component.vue.md)
- crates/oxc_formatter/DIVERGENCES.md#union-annotation-flat-retry, apps/oxfmt/DIVERGENCES.md#ts-in-vue-generic-trailing-comma
### Option 2: 425/427 (99.53%)
### Option 2: 422/424 (99.53%)
```json
{"printWidth":100,"vueIndentScriptAndStyle":true,"singleQuote":true}