Skip to content

Commit f69f739

Browse files
committed
Remove versions key in tests
1 parent f6661cd commit f69f739

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

tests/plugins.test.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@ import { format, no, pluginPath, t, yes } from './utils.js'
66
const require = createRequire(import.meta.url)
77

88
interface PluginTest {
9-
versions: number[]
109
plugins: string[]
1110
options?: Record<string, any>
1211
tests: Record<string, TestEntry[]>
1312
}
1413

1514
let tests: PluginTest[] = [
1615
{
17-
versions: [2, 3],
1816
plugins: ['@trivago/prettier-plugin-sort-imports'],
1917
options: {
2018
importOrder: ['^@one/(.*)$', '^@two/(.*)$', '^[./]'],
@@ -44,7 +42,6 @@ let tests: PluginTest[] = [
4442
},
4543
},
4644
{
47-
versions: [2, 3],
4845
plugins: ['@ianvs/prettier-plugin-sort-imports'],
4946
options: {
5047
importOrder: ['^@tailwindcss/(.*)$', '^@babel/(.*)$', '^[./]'],
@@ -74,7 +71,6 @@ let tests: PluginTest[] = [
7471
},
7572
},
7673
{
77-
versions: [3],
7874
plugins: ['prettier-plugin-sort-imports'],
7975
options: {
8076
sortingMethod: 'alphabetical',
@@ -103,7 +99,6 @@ let tests: PluginTest[] = [
10399
},
104100
},
105101
{
106-
versions: [3],
107102
plugins: ['prettier-plugin-multiline-arrays'],
108103
tests: {
109104
babel: [[`const array = [\n'one']`, `const array = [\n 'one',\n]`]],
@@ -112,7 +107,6 @@ let tests: PluginTest[] = [
112107
},
113108
},
114109
{
115-
versions: [2, 3],
116110
plugins: ['prettier-plugin-organize-imports'],
117111
options: {},
118112
tests: {
@@ -137,7 +131,6 @@ let tests: PluginTest[] = [
137131
},
138132
},
139133
{
140-
versions: [3],
141134
plugins: ['@zackad/prettier-plugin-twig-melody'],
142135
options: {
143136
twigAlwaysBreakObjects: false,
@@ -172,7 +165,6 @@ let tests: PluginTest[] = [
172165
},
173166
},
174167
{
175-
versions: [2, 3],
176168
plugins: ['@prettier/plugin-pug'],
177169
tests: {
178170
pug: [
@@ -206,7 +198,6 @@ let tests: PluginTest[] = [
206198
},
207199
{
208200
// NOTE: This plugin doesn't officially support Prettier v3 but it seems to work fine
209-
versions: [2, 3],
210201
plugins: ['prettier-plugin-import-sort'],
211202
tests: {
212203
babel: [
@@ -223,7 +214,6 @@ let tests: PluginTest[] = [
223214
},
224215
},
225216
{
226-
versions: [2, 3],
227217
plugins: ['prettier-plugin-jsdoc'],
228218
tests: {
229219
babel: [
@@ -235,7 +225,6 @@ let tests: PluginTest[] = [
235225
},
236226
},
237227
{
238-
versions: [2, 3],
239228
plugins: ['prettier-plugin-css-order'],
240229
tests: {
241230
css: [
@@ -248,7 +237,6 @@ let tests: PluginTest[] = [
248237
},
249238
{
250239
// NOTE: This plugin doesn't officially support Prettier v3 but it appears to work
251-
versions: [2, 3],
252240
plugins: ['prettier-plugin-style-order'],
253241
tests: {
254242
css: [
@@ -260,7 +248,6 @@ let tests: PluginTest[] = [
260248
},
261249
},
262250
{
263-
versions: [2, 3],
264251
plugins: ['prettier-plugin-organize-attributes'],
265252
tests: {
266253
html: [
@@ -272,7 +259,6 @@ let tests: PluginTest[] = [
272259
},
273260
},
274261
{
275-
versions: [2, 3],
276262
plugins: ['@shopify/prettier-plugin-liquid'],
277263
tests: {
278264
'liquid-html': [
@@ -306,7 +292,6 @@ let tests: PluginTest[] = [
306292
},
307293
},
308294
{
309-
versions: [3],
310295
plugins: ['prettier-plugin-marko'],
311296
tests: {
312297
marko: [
@@ -350,7 +335,6 @@ let tests: PluginTest[] = [
350335
},
351336
},
352337
{
353-
versions: [2, 3],
354338
plugins: ['prettier-plugin-astro'],
355339
tests: {
356340
astro: [
@@ -402,7 +386,6 @@ import Custom from '../components/Custom.astro'
402386
},
403387
},
404388
{
405-
versions: [2, 3],
406389
plugins: ['prettier-plugin-svelte'],
407390
tests: {
408391
svelte: [
@@ -460,14 +443,7 @@ import Custom from '../components/Custom.astro'
460443
for (const group of tests) {
461444
let name = group.plugins.join(', ')
462445

463-
let canRun = group.versions.includes(3)
464-
465446
for (let parser in group.tests) {
466-
if (!canRun) {
467-
test.todo(`parsing ${parser} works with: ${name}`)
468-
continue
469-
}
470-
471447
test(`parsing ${parser} works with: ${name}`, async ({ expect }) => {
472448
// Hide logs from Pug's prettier plugin
473449
if (parser === 'pug') {

0 commit comments

Comments
 (0)