Skip to content

Commit

Permalink
replace whitepsace tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rellafella committed Aug 14, 2024
1 parent b28357b commit 3354cca
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 35 deletions.
15 changes: 15 additions & 0 deletions tests/Whitespace/__snapshots__/element.snap.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<div>
<img src="person.jpg" />
</div>

<p>
This is some text This is some text This is some text This is some text This
is some text This is some text This is some text This is some text This is
some text
</p>

<div class="striped-rows">
<!-- Pregunta 1 -->
{% include 'pages/formularios/sub/pregunta-simple.html' %}
{% set index = index + 1 %}
</div>
34 changes: 0 additions & 34 deletions tests/Whitespace/__snapshots__/jsfmt.spec.js.snap

This file was deleted.

15 changes: 14 additions & 1 deletion tests/Whitespace/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
run_spec(__dirname, ["twig"]);
import { run_spec } from "tests_config/run_spec";
import { describe, expect, it } from "vitest";

/** @type {import('tests_config/run_spec').PrettierOptions} */
const formatOptions = {};

describe("Whitespace", () => {
it("should handle whitespace", async () => {
const { actual, snapshotFile } = await run_spec(import.meta.url, {
source: "element.twig"
});
await expect(actual).toMatchFileSnapshot(snapshotFile);
});
});

0 comments on commit 3354cca

Please sign in to comment.