k6
k6 copied to clipboard
info(message?: any, ...optionalParams: any[]) not taking optionalParams into account
Brief summary
console.info(message?: any, ...optionalParams: any[]) and similar (#log, #error, etc.)
seem to ignore optionalParams.
k6 version
1.0.0
OS
OS-X 15.3
Docker version and image (if applicable)
4.40.0 (187762)
Steps to reproduce the problem
Calling the console in a script like this:
console.info("Some info with optional params. number: %d; word-of-the-day: %s.", [5, "hello"]); //a
console.info("Some info with optional params. number: %d; word-of-the-day: %s.", 5, "hello"); //b
tbh - I'm unsure whether (a) or (b) is the correct syntax. But one of them should be correct
Expected behaviour
INFO[0000] Some info with optional params. number: 5; word-of-the-day: hello. INFO[0000] Some info with optional params. number: 5; word-of-the-day: hello.
Actual behaviour
INFO[0000] Some info with optional params. number: %d; word-of-the-day: %s. [5,"hello"] source=console INFO[0000] Some info with optional params. number: %d; word-of-the-day: %s. 5 hello source=console