You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/developer/contributing/development-functional-tests.asciidoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ We use functional tests to make sure the {kib} UI works as expected. It replaces
6
6
[discrete]
7
7
=== Running functional tests
8
8
9
-
The `FunctionalTestRunner` is very bare bones and gets most of its functionality from its config file, located at link:{kib-repo}tree/{branch}/test/functional/config.js[test/functional/config.js]. If you’re writing a plugin outside the {kib} repo, you will have your own config file.
9
+
The `FunctionalTestRunner` is very bare bones and gets most of its functionality from its config file, located at {blob}test/functional/config.js[test/functional/config.js] or {blob}x-pack/test/functional/config.js[x-pack/test/functional/config.js]. If you’re writing a plugin outside the {kib} repo, you will have your own config file.
10
10
See <<external-plugin-functional-tests>> for more info.
11
11
12
12
There are three ways to run the tests depending on your goals:
To ensure that your changes will not break other functionality, please run the test suite and build (<<building-kibana>>) before submitting your Pull Request.
5
-
6
4
[discrete]
7
5
=== Running specific {kib} tests
8
6
@@ -13,63 +11,57 @@ invoke them:
13
11
|===
14
12
|Test runner |Test location |Runner command (working directory is {kib}
Kibana primarily uses Jest for unit testing. Each plugin or package defines a `jest.config.js` that extends link:{kib-repo}tree/{branch}/packages/kbn-test/jest-preset.js[a preset] provided by the link:{kib-repo}tree/{branch}/packages/kbn-test[`@kbn/test`] package. Unless you intend to run all unit tests within the project, it's most efficient to provide the Jest configuration file for the plugin or package you're testing.
50
37
51
-
**Testing IE on OS X**
38
+
[source,bash]
39
+
----
40
+
yarn jest --config src/plugins/dashboard/jest.config.js
41
+
----
52
42
53
-
**Note:** IE11 is not supported from 7.9 onwards.
43
+
A script is available to provide a better user experience when testing while navigating throughout the repository. To run the tests within your current working directory, use `yarn test:jest`. Like the Jest CLI, you can also supply a path to determine which tests to run.
yarn jest --coverage --verbose --config /home/tyler/elastic/kibana/src/plugins/dashboard/jest.config.js server
61
+
----
62
+
63
+
NOTE: There are still a handful of legacy tests that use the Mocha test runner. For those tests, use `node scripts/mocha --grep=regexp [test path]`. Tests using Mocha are located within `__tests__` directories.
0 commit comments