diff options
Diffstat (limited to 'resources/resource_transformers/js/build_test.go')
-rw-r--r-- | resources/resource_transformers/js/build_test.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/resources/resource_transformers/js/build_test.go b/resources/resource_transformers/js/build_test.go index c04c0ed12..8839c646e 100644 --- a/resources/resource_transformers/js/build_test.go +++ b/resources/resource_transformers/js/build_test.go @@ -77,4 +77,20 @@ func TestToBuildOptions(t *testing.T) { Sourcemap: api.SourceMapInline, Stdin: &api.StdinOptions{}, }) + + opts, err = toBuildOptions(Options{ + Target: "es2018", Format: "cjs", Minify: true, mediaType: media.JavascriptType, + SourceMap: "external"}) + c.Assert(err, qt.IsNil) + c.Assert(opts, qt.DeepEquals, api.BuildOptions{ + Bundle: true, + Target: api.ES2018, + Format: api.FormatCommonJS, + MinifyIdentifiers: true, + MinifySyntax: true, + MinifyWhitespace: true, + Sourcemap: api.SourceMapExternal, + Stdin: &api.StdinOptions{}, + }) + } |