diff --git a/lib/hyperscript/parser.sx b/lib/hyperscript/parser.sx index 0c337953..80e87099 100644 --- a/lib/hyperscript/parser.sx +++ b/lib/hyperscript/parser.sx @@ -2749,6 +2749,7 @@ ((= val "behavior") (do (adv!) (parse-behavior-feat))) ((= val "live") (do (adv!) (parse-live-feat))) ((= val "when") (do (adv!) (parse-when-feat))) + ((= val "worker") (error "worker plugin is not installed — see https://hyperscript.org/features/worker")) (true (parse-cmd-list)))))) (define coll-feats diff --git a/shared/static/wasm/sx/hs-parser.sx b/shared/static/wasm/sx/hs-parser.sx index 0c337953..80e87099 100644 --- a/shared/static/wasm/sx/hs-parser.sx +++ b/shared/static/wasm/sx/hs-parser.sx @@ -2749,6 +2749,7 @@ ((= val "behavior") (do (adv!) (parse-behavior-feat))) ((= val "live") (do (adv!) (parse-live-feat))) ((= val "when") (do (adv!) (parse-when-feat))) + ((= val "worker") (error "worker plugin is not installed — see https://hyperscript.org/features/worker")) (true (parse-cmd-list)))))) (define coll-feats diff --git a/spec/tests/test-hyperscript-behavioral.sx b/spec/tests/test-hyperscript-behavioral.sx index 555e4a31..9a9e4fcc 100644 --- a/spec/tests/test-hyperscript-behavioral.sx +++ b/spec/tests/test-hyperscript-behavioral.sx @@ -13595,5 +13595,9 @@ end") ;; ── worker (1 tests) ── (defsuite "hs-upstream-worker" (deftest "raises a helpful error when the worker plugin is not installed" - (error "SKIP (untranslated): raises a helpful error when the worker plugin is not installed")) + (let ((result (guard (e (true (if (string? e) e (str e)))) + (hs-compile "worker MyWorker def noop() end end") + ""))) + (assert (contains? result "worker plugin")) + (assert (contains? result "hyperscript.org/features/worker")))) )