testcafe icon indicating copy to clipboard operation
testcafe copied to clipboard

TestCafe hides errors thrown in the `.testcaferc.js` file

Open felis2803 opened this issue 3 years ago • 0 comments

What is your Scenario?

Running tests with a configuration file that should throw an error.

What is the Current behavior?

TestCafe hides the real error and instead shows: ERROR You have not specified a browser.

What is the Expected behavior?

TestCafe should show the real error.

Your complete configuration file

throw new Error('Do not hide this Error!');

module.exports = {
    browsers: ['chrome', 'firefox']
};

Your complete test report

An error has occurred while reading the "C:\Users\admin\TestCafeStudio\Examples\003\.testcaferc.js" configuration file.
ERROR You have not specified a browser.

Steps to Reproduce

  1. Create .testcaferc.js which throws an error.
  2. Run in console: testcafe.

TestCafe version

1.20.0

Node.js version

18.5.0

Command-line arguments

testcafe

felis2803 avatar Aug 02 '22 06:08 felis2803