Skip to content

chore(docs): run WASM tests with Cargo#1965

Merged
onur-ozkan merged 7 commits intodevfrom
borngraced-patch-1
Sep 11, 2023
Merged

chore(docs): run WASM tests with Cargo#1965
onur-ozkan merged 7 commits intodevfrom
borngraced-patch-1

Conversation

@borngraced
Copy link
Copy Markdown

add docs for running WASM tests with Cargo

@borngraced borngraced self-assigned this Sep 9, 2023
CC=/opt/homebrew/opt/llvm/bin/clang AR=/opt/homebrew/opt/llvm/bin/llvm-ar wasm-pack test --firefox --headless mm2src/mm2_main
```
Please note `CC` and `AR` must be specified in the same line as `wasm-pack test mm2src/mm2_main`.
#### Running WASM tests with Cargo</br>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me, the way this looks feels too much like "you can run tests with cargo without needing to setup things above".

Copy link
Copy Markdown
Author

@borngraced borngraced Sep 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm, I think this is mostly useful when you want to run a single or some specific wasm tests alone. While the other tries to run all tests

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My concern is this title can lead to confusions. Different title("example of running single test") would be more appropriate I guess.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand, but keep in mind that the command can also be used to run the full test just like wasm-pack..hence why I used the title as it's not just limited to running single/some tests

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know but I don't think anyone will think cargo can only do single test. Command explicitly contains flags that everyone can understand. I want to avoid the confusion of "there is an alternative way of running wasm tests that don't require prequests mentioned above".

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok got it. amended now

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we run single test using wasm-pack? If we can, we should use wasm-pack for "example of running single test", and find better title for cargo one probably.

Copy link
Copy Markdown
Author

@borngraced borngraced Sep 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I understood that, thanks.
but personally, I'm not sure if wasm-pack can perform same action tho

Copy link
Copy Markdown

@onur-ozkan onur-ozkan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@onur-ozkan onur-ozkan changed the title enhancement(docs): run WASM tests with Cargo chore(docs): run WASM tests with Cargo Sep 11, 2023
@onur-ozkan
Copy link
Copy Markdown

onur-ozkan commented Sep 11, 2023

@onur-ozkan onur-ozkan merged commit 06a0957 into dev Sep 11, 2023
@onur-ozkan onur-ozkan deleted the borngraced-patch-1 branch September 11, 2023 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants