Skip to content

Commit

Permalink
Add CI, fix faulty test
Browse files Browse the repository at this point in the history
  • Loading branch information
Bright-Shard committed Nov 20, 2024
1 parent 690ae0b commit 90de731
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Tests
on: [push, workflow_dispatch]
jobs:
Documentation-Tests:
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: -D warnings
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cargo Doc
run: cargo doc --features std
Unit-Tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cargo Test
run: cargo test -- --nocapture
9 changes: 7 additions & 2 deletions src/minifier/html.rs
Original file line number Diff line number Diff line change
Expand Up @@ -573,9 +573,14 @@ mod tests {
expected: "<body><p>hi</p></body>",
},
Tester {
name: "Includes whitespace in textual comments",
name: "Minimises whitespace in textual tags",
source: "<p> This has weird whitespace!!!\n</p>",
expected: "<p> This has weird whitespace!!!\n</p>",
expected: "<p> This has weird whitespace!!!</p>",
},
Tester {
name: "Includes whitespace in preformatted tags",
source: "<pre> This has weird whitespace!!!\n</pre>",
expected: "<pre> This has weird whitespace!!!\n</pre>",
},
Tester {
name: "Element properties",
Expand Down

0 comments on commit 90de731

Please sign in to comment.