From 5e437b1bd1db36baaf9b28d0707879b931f8f93e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Miri=C4=87?= Date: Wed, 25 Sep 2019 09:34:05 +0200 Subject: [PATCH] wip: feat #1049 --- cmd/run.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/run.go b/cmd/run.go index aafeeaab071..2e097f4086d 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -69,6 +69,7 @@ var ( runType = os.Getenv("K6_TYPE") runNoSetup = os.Getenv("K6_NO_SETUP") != "" runNoTeardown = os.Getenv("K6_NO_TEARDOWN") != "" + runCompatMode = os.Getenv("K6_COMPATIBILITY_MODE") ) // runCmd represents the run command. @@ -485,6 +486,8 @@ func runCmdFlagSet() *pflag.FlagSet { // variables will affect the usage message // - and finally, global variables are not very testable... :/ flags.StringVarP(&runType, "type", "t", runType, "override file `type`, \"js\" or \"archive\"") + flags.StringVar(&runCompatMode, "compatibility-mode", "es6", + "JavaScript compiler compatibility mode, \"es6\" or \"es51\" (default \"es6\")") flags.Lookup("type").DefValue = "" flags.BoolVar(&runNoSetup, "no-setup", runNoSetup, "don't run setup()") falseStr := "false" // avoiding goconst warnings...