File: 1002_avoid_timeout_in_tests.patch

package info (click to toggle)
uglifyjs 2.8.29-9
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,952 kB
  • sloc: javascript: 30,233; makefile: 22; sh: 4
file content (42 lines) | stat: -rw-r--r-- 1,404 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Description: Avoid hardcoded timeout in tests
 Some tests fail on slow hardware.
 .
 Better to leave it to the test environment to deal with tests hanging.
Forwarded: no
Author: Jonas Smedegaard <dr@jones.dk>
Bug-Debian: https://bugs.debian.org/851318
Bug-Debian: https://bugs.debian.org/917746
Last-Update: 2018-12-30
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/test/mocha/let.js
+++ b/test/mocha/let.js
@@ -3,7 +3,6 @@
 
 describe("let", function() {
     it("Should not produce `let` as a variable name in mangle", function(done) {
-        this.timeout(10000);
 
         // Produce a lot of variables in a function and run it through mangle.
         var s = '"use strict"; function foo() {';
--- a/test/mocha/spidermonkey.js
+++ b/test/mocha/spidermonkey.js
@@ -4,7 +4,6 @@
 
 describe("spidermonkey export/import sanity test", function() {
     it("should produce a functional build when using --self with spidermonkey", function (done) {
-        this.timeout(20000);
 
         var uglifyjs = '"' + process.argv[0] + '" bin/uglifyjs';
         var command = uglifyjs + " --self -cm --wrap SpiderUglify --dump-spidermonkey-ast | " +
--- a/test/mocha.js
+++ b/test/mocha.js
@@ -3,7 +3,7 @@
     path = require('path');
 
 // Instantiate a Mocha instance.
-var mocha = new Mocha({});
+var mocha = new Mocha({ timeout: 0 });
 
 var testDir = __dirname + '/mocha/';