Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/mocha-3.1.2/test/integration/fixtures/timeout.fixture.js')
-rw-r--r--tests/lib/mocha-3.1.2/test/integration/fixtures/timeout.fixture.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/lib/mocha-3.1.2/test/integration/fixtures/timeout.fixture.js b/tests/lib/mocha-3.1.2/test/integration/fixtures/timeout.fixture.js
new file mode 100644
index 0000000000..d237436811
--- /dev/null
+++ b/tests/lib/mocha-3.1.2/test/integration/fixtures/timeout.fixture.js
@@ -0,0 +1,19 @@
+'use strict';
+
+describe('timeout', function () {
+ this.timeout(1);
+
+ it('should be honored with sync suites', function () {
+ sleep(2);
+ });
+
+ it('should be honored with async suites', function (done) {
+ sleep(2);
+ done();
+ });
+
+ function sleep (ms) {
+ var start = Date.now();
+ while (start + ms > Date.now());
+ }
+});