Skip to content

Commit

Permalink
Add html macro open tag parse tag
Browse files Browse the repository at this point in the history
This commit adds a test to the `html-macro`.

The test verifies that we parse opening tags correctly, such as
```
<div id="hello">
```

This test was introduced to help others understand how to test the
macro's internals.
Being able to test the more complex aspects of the macro's internals
helps with getting quicker feedback when working on the internals.
  • Loading branch information
chinedufn committed May 23, 2024
1 parent c49e279 commit 5c6a8d5
Show file tree
Hide file tree
Showing 18 changed files with 377 additions and 254 deletions.
File renamed without changes.
62 changes: 30 additions & 32 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,41 +11,39 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions-rs/cargo@v1
- uses: actions/checkout@v2

- name: Latest Rust Nightly
uses: actions-rs/toolchain@v1
with:
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
# Used when testing with `wasm-pack test`
target: wasm32-unknown-unknown

- name: Rust Version Info
run: rustc --version && cargo --version && echo $CARGO_HOME

- name: Install wasm-pack
run: >
curl -L https://github.com/rustwasm/wasm-pack/releases/download/v0.10.0/wasm-pack-v0.10.0-x86_64-unknown-linux-musl.tar.gz
| tar --strip-components=1 --wildcards -xzf - "*/wasm-pack"
&& chmod +x wasm-pack
&& mv wasm-pack $HOME/.cargo/bin/
- name: Browser versions
run: wasm-pack --version && firefox --version

- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Run all tests
run: ./test.sh

# NOTE: We can start running the full test suite on stable after https://github.com/rust-lang/rust/issues/54725
- name: Check that Stable can compile
run: cargo +stable check --all
- name: Rust Version Info
run: rustc --version && cargo --version && echo $CARGO_HOME

- name: Install wasm-pack
run: >
curl -L https://github.com/rustwasm/wasm-pack/releases/download/v0.10.0/wasm-pack-v0.10.0-x86_64-unknown-linux-musl.tar.gz
| tar --strip-components=1 --wildcards -xzf - "*/wasm-pack"
&& chmod +x wasm-pack
&& mv wasm-pack $HOME/.cargo/bin/
- name: Browser versions
run: wasm-pack --version && firefox --version

- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Run all tests
run: ./test.sh

# NOTE: We can start running the full test suite on stable after https://github.com/rust-lang/rust/issues/54725
- name: Check that Stable can compile
run: cargo +stable check --all
Loading

0 comments on commit 5c6a8d5

Please sign in to comment.