Skip to content

Commit

Permalink
Increase test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Siecje committed Feb 2, 2024
1 parent ce2c367 commit 34914a3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ def test_build_css_minify_no_css_files(run_start: CliRunner) -> None:
assert re.search(SUCCESS_REGEX, result.output)


def test_build_no_css_minify_no_js_minify(run_start: CliRunner) -> None:
result = run_start.invoke(build, ['--no-css-minify', '--no-js-minify'])
assert result.exit_code == 0
assert re.search(SUCCESS_REGEX, result.output)


def test_build_html_pretty_true(run_start: CliRunner) -> None:
config_path = Path('config.toml')
with config_path.open('r') as config_file:
Expand Down
16 changes: 16 additions & 0 deletions tests/test_preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,19 @@ def test_preview(run_start: CliRunner) -> None:
# Why is this 5?
expected_exit_code = 5
assert result.exit_code == expected_exit_code


def test_preview_css_minify_js_minify(run_start: CliRunner) -> None:
run_start.invoke(preview, ['--css-minify', '--js-minify'])


def test_preview_no_css_minify(run_start: CliRunner) -> None:
run_start.invoke(preview, ['--no-css-minify', '--js-minify'])


def test_preview_css_minify_no_js_minify(run_start: CliRunner) -> None:
run_start.invoke(preview, ['--css-minify', '--no-js-minify'])


def test_preview_no_css_minify_no_js_minify(run_start: CliRunner) -> None:
run_start.invoke(preview, ['--no-css-minify', '--no-js-minify'])

0 comments on commit 34914a3

Please sign in to comment.