Creating the test project configuration file
In this section, we will see how to configure TestCafe. However, before reviewing the main configuration options, let's set a convention for some coding style standards.
Accepting code styling convention
When writing code throughout this book, we will follow some simple rules, such as indenting with two spaces for .json
files and four spaces for .js
files. We will also use semicolons and single-quotes. Most popular code editors support a .editorconfig
configuration file to automatically apply the rules:
root = true [*]indent_style = space indent_size = 4 end_of_line = lf insert_final_newline = true charset = utf-8 trim_trailing_whitespace = true max_line_length = 120 [*.json]indent_size = 2
You can copy the basic config file that we will be using from https://github.com/PacktPublishing/Modern-Web-Testing-with-TestCafe/blob/master/.editorconfig.
Exploring the configuration settings
The TestCafe configuration settings...