From fa0b538c3e32a739c5bbd9b2eaa6a77241b775cc Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Wed, 11 May 2022 15:13:19 +0100 Subject: [PATCH] Clarify `--environment` option for `carton test` in `README.md` Resolves https://github.com/swiftwasm/carton/issues/322. --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 35764c47..441aae68 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,10 @@ page you'd like to use when serving, pass a path to it with a `--custom-index-pa The `carton test` command runs your test suite in [`wasmer`](https://wasmer.io/), [`node`](https://nodejs.org/en/) or using your default browser. You can switch between these with the `--environment` option, passing -either: `wasmer`, `node` or `defaultBrowser`. +either: `wasmer`, `node` or `defaultBrowser`. Code that depends on +[JavaScriptKit](https://github.com/swiftwasm/JavaScriptKit) should pass either `--environment node` or +`--environment defaultBrowser` options, depending on whether it needs Web APIs to work. Otherwise +the test run will not succeed, since JavaScript environment is not available with `--environment wasmer`. The `carton sdk` command and its subcommands allow you to manage installed SwiftWasm toolchains, but is rarely needed, as `carton dev` installs the recommended version of SwiftWasm automatically.