mirror of
https://github.com/Hopiu/djLint.git
synced 2026-05-14 00:03:10 +00:00
21 lines
445 B
Python
21 lines
445 B
Python
|
|
"""DjLint tests for alpine.js."""
|
||
|
|
# pylint: disable=C0116
|
||
|
|
from typing import TextIO
|
||
|
|
|
||
|
|
from click.testing import CliRunner
|
||
|
|
|
||
|
|
from tests.conftest import reformat
|
||
|
|
|
||
|
|
|
||
|
|
def test_alpine_js(runner: CliRunner, tmp_file: TextIO) -> None:
|
||
|
|
output = reformat(
|
||
|
|
tmp_file,
|
||
|
|
runner,
|
||
|
|
b"""<div id="collapse"
|
||
|
|
x-data="{ show: true }"
|
||
|
|
x-show="show"
|
||
|
|
x-transition.duration.500ms></div>""",
|
||
|
|
)
|
||
|
|
|
||
|
|
assert output.exit_code == 0
|