summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Zallmann <tzallmann@gitlab.com>2018-07-09 16:56:04 +0000
committerTim Zallmann <tzallmann@gitlab.com>2018-07-09 16:56:04 +0000
commita0935bf267b18c14a120809acd56a794c73121e3 (patch)
treea6f4c78a2a427d2bfba59158510f2b07ed0e6437
parent630dfb41b8cd7acf0b39b06511f3a10485e751e8 (diff)
parentd8013704b66a9f8653af87c8202d980cc30cb003 (diff)
downloadgitlab-ce-a0935bf267b18c14a120809acd56a794c73121e3.tar.gz
Merge branch 'winh-waiting-in-tests-docs' into 'master'
Document that we don't want to wait in tests See merge request gitlab-org/gitlab-ce!20502
-rw-r--r--doc/development/testing_guide/frontend_testing.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/development/testing_guide/frontend_testing.md b/doc/development/testing_guide/frontend_testing.md
index 3b2b9c8c947..f8993653aec 100644
--- a/doc/development/testing_guide/frontend_testing.md
+++ b/doc/development/testing_guide/frontend_testing.md
@@ -172,6 +172,10 @@ object which can be treated like any other jasmine spy object.
Further documentation on the babel rewire pluign API can be found on
[its repository Readme doc](https://github.com/speedskater/babel-plugin-rewire#babel-plugin-rewire).
+#### Waiting in tests
+
+If you cannot avoid using [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout) in tests, please use the [Jasmine mock clock](https://jasmine.github.io/api/2.9/Clock.html).
+
### Vue.js unit tests
See this [section][vue-test].