diff --git a/docs/guide/writing-tests/using-test-globals.md b/docs/guide/writing-tests/using-test-globals.md index 478938c..4f23e6f 100644 --- a/docs/guide/writing-tests/using-test-globals.md +++ b/docs/guide/writing-tests/using-test-globals.md @@ -13,22 +13,19 @@ Here's an example definition using the `"globals"` property in `nightwatch.json`
nightwatch.conf.js -
{
-  "src_folders": [],
+

+myGlobal = 3000;
+myGlobal2 = 'hello world';
 
-  "globals": {
-    "myGlobalVar" : "some value",
-    "otherGlobal" : "some other value"
-  },
+// Refer to the online docs for more details:
+// https://nightwatchjs.org/gettingstarted/configuration/
+//
 
-  "test_settings": {
-    "default": {
-      "launch_url": "https://nightwatchjs.org",
-    }
-  }
-}
+ +
+Note how the variables can be defined at the top of the config file. Like the `launch_url` property, the `globals` object is made available directly on the Nightwatch api which is passed to the tests.