summaryrefslogtreecommitdiff
path: root/docs/contributing
diff options
context:
space:
mode:
authorLuca Casonato <lucacasonato@yahoo.com>2021-01-24 22:29:36 +0100
committerGitHub <noreply@github.com>2021-01-24 22:29:36 +0100
commit66e99d349b31f5cd30b868d80ebdab6ba749fd96 (patch)
tree2fdf22255cb15a750574d37b33de2a4637d62a5e /docs/contributing
parentfeff6361b1247c82bb86aedfea349b04899b9610 (diff)
tests: enable wpt for url (#9046)
Diffstat (limited to 'docs/contributing')
-rw-r--r--docs/contributing/building_from_source.md35
1 files changed, 35 insertions, 0 deletions
diff --git a/docs/contributing/building_from_source.md b/docs/contributing/building_from_source.md
index 227b42418..7801d1b15 100644
--- a/docs/contributing/building_from_source.md
+++ b/docs/contributing/building_from_source.md
@@ -109,3 +109,38 @@ cargo clean && cargo build -vv
# Run:
./target/debug/deno run cli/tests/002_hello.ts
```
+
+### Testing
+
+> :warning: **IMPORTANT**: Our test suite relies on certain entries to be
+> configured in your /etc/hosts file. If these entries are not present in your
+> /etc/hosts file, the `web_platform_tests` test **will** fail. To configure
+> these entries, run the following command:
+
+> ```shell
+> # macOS / Linux
+> cd test_utils/wpt/
+> ./wpt make-hosts-file | sudo tee -a /etc/hosts
+> ```
+
+> ```powershell
+> # Windows (use powershell!)
+> cd test_utils/wpt/
+> python wpt make-hosts-file | Out-File $env:SystemRoot\System32\drivers\etc\hosts -Encoding ascii -Append
+> ```
+
+> If you use WSL, be aware that WSL may attempt to override /etc/hosts each time
+> it is launched, which would then require you to re-run hosts this setup. This
+> behavior
+> [can be configured](https://docs.microsoft.com/en-us/windows/wsl/wsl-config#network).
+
+```shell
+# Run the full test suite:
+cargo test
+
+# Run a specific test:
+cargo test web_platform_tests
+
+# Run a specific test, and don't swallow test output:
+cargo test web_platform_tests -- --nocapture
+```