diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-11-03 09:05:09 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-11-03 13:04:37 +0100 |
commit | 3b2fe3cd33b74166c3debec9826826f2b5a54fd9 (patch) | |
tree | 81fe4cd8a5123a8c9e5ea76e35a97dfeed8ce0cd /resources/resource_transformers/js/options_test.go | |
parent | 85e4dd7370eae97ae367e596aa6a10ba42fd4b7c (diff) |
js: Add avoidTDZ option
Fixes #7865
Diffstat (limited to 'resources/resource_transformers/js/options_test.go')
-rw-r--r-- | resources/resource_transformers/js/options_test.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/resources/resource_transformers/js/options_test.go b/resources/resource_transformers/js/options_test.go index 89d362ab9..abc8091a9 100644 --- a/resources/resource_transformers/js/options_test.go +++ b/resources/resource_transformers/js/options_test.go @@ -54,7 +54,12 @@ func TestToBuildOptions(t *testing.T) { }) opts, err = toBuildOptions(Options{ - Target: "es2018", Format: "cjs", Minify: true, mediaType: media.JavascriptType}) + Target: "es2018", + Format: "cjs", + Minify: true, + mediaType: media.JavascriptType, + AvoidTDZ: true, + }) c.Assert(err, qt.IsNil) c.Assert(opts, qt.DeepEquals, api.BuildOptions{ Bundle: true, @@ -63,6 +68,7 @@ func TestToBuildOptions(t *testing.T) { MinifyIdentifiers: true, MinifySyntax: true, MinifyWhitespace: true, + AvoidTDZ: true, Stdin: &api.StdinOptions{ Loader: api.LoaderJS, }, |