Test case details

Preparation Code

class Logger { static set productionMode(isProduction) { if (isProduction) { Logger.log = () => {}; Logger.error = () => {}; Logger.info = () => {}; Logger.warn = () => {}; } else { Logger.log = console.log; Logger.error = console.error; Logger.info = console.info; Logger.warn = console.warn; } } static log(){} static error(){} static info(){} static warn(){} } Logger.productionMode = true; class Logger2 { static set productionMode(isProduction) { if (isProduction) { Logger2.log = () => {}; Logger2.error = () => {}; Logger2.info = () => {}; Logger2.warn = () => {}; } else { Logger2.log = console.log; Logger2.error = console.error; Logger2.info = console.info; Logger2.warn = console.warn; } } static log(){} static error(){} static info(){} static warn(){} } Logger2.productionMode = false;

Test cases

Test #1

Logger.log('Logging stuff');

Test #2

Logger2.log('Logging stuff');