How to set timezone to an automation test with Mocha.js on LambdaTest cloud?

How to set timezone to an automation test with Mocha.js on LambdaTest cloud?

Hi Tom,

In order to set a timezone to an automation test with Mocha.js on LambdaTest cloud, you can refer to these following steps. You can also refer to the sample test repo:

To run your automation test for a particular timezone, you can change the timezone using the ‘timezone’ capability in the conf/single.conf.js file. For example, setting timezone to “UTC-5:00”:

    exports.capabilities = {
        'build': 'Mocha-Selenium-Sample', //Build name
        'name': 'Your Test Name', // Test name
        'platform':'Windows 10', // OS name
        'browserName': 'chrome', // Browser name
        'version': 'latest', // Browser version
        'visual': false,  // To take step by step screenshot
        'network':false,  // To capture network Logs
        'console':false, // To capture console logs.
        'tunnel': false, // If you want to run the localhost than change it to true
        'timezone': 'UTC-05:00'
};

Here’s the GitHub repo for the same: https://github.com/rshmimondal/Mocha-js-timezone