teaspoon-jasmine 2.3.4 → 2.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/teaspoon/jasmine/assets/jasmine/2.4.1.js +3454 -0
- data/lib/teaspoon/jasmine/assets/jasmine/2.9.1.js +5542 -0
- data/lib/teaspoon/jasmine/assets/teaspoon-jasmine1.js +42 -22
- data/lib/teaspoon/jasmine/assets/teaspoon-jasmine2.js +41 -21
- data/lib/teaspoon/jasmine/framework.rb +1 -1
- data/lib/teaspoon/jasmine/templates/spec_helper.coffee +2 -2
- data/lib/teaspoon/jasmine/templates/spec_helper.js +2 -2
- data/lib/teaspoon/jasmine/version.rb +1 -1
- metadata +7 -6
@@ -35,6 +35,24 @@
|
|
35
35
|
return new (Teaspoon.resolveClass("Runner"))();
|
36
36
|
};
|
37
37
|
|
38
|
+
Teaspoon.setupErrorHandler = function() {
|
39
|
+
var originalOnError;
|
40
|
+
originalOnError = window.onerror;
|
41
|
+
return window.onerror = function(message) {
|
42
|
+
if (originalOnError && originalOnError.call) {
|
43
|
+
originalOnError.apply(null, arguments);
|
44
|
+
}
|
45
|
+
if (Teaspoon.started) {
|
46
|
+
return;
|
47
|
+
}
|
48
|
+
return Teaspoon.messages.push(JSON.stringify({
|
49
|
+
_teaspoon: true,
|
50
|
+
type: "exception",
|
51
|
+
message: message
|
52
|
+
}));
|
53
|
+
};
|
54
|
+
};
|
55
|
+
|
38
56
|
Teaspoon.reload = function() {
|
39
57
|
return window.location.reload();
|
40
58
|
};
|
@@ -77,12 +95,12 @@
|
|
77
95
|
};
|
78
96
|
|
79
97
|
Teaspoon.log = function() {
|
80
|
-
var e;
|
98
|
+
var e, error;
|
81
99
|
Teaspoon.messages.push(arguments[0]);
|
82
100
|
try {
|
83
101
|
return typeof console !== "undefined" && console !== null ? typeof console.log === "function" ? console.log.apply(console, arguments) : void 0 : void 0;
|
84
|
-
} catch (
|
85
|
-
e =
|
102
|
+
} catch (error) {
|
103
|
+
e = error;
|
86
104
|
throw new Error("Unable to use console.log for logging");
|
87
105
|
}
|
88
106
|
};
|
@@ -111,7 +129,7 @@
|
|
111
129
|
|
112
130
|
Teaspoon.checkNamespace = function(root, klass) {
|
113
131
|
var i, j, len, namespace, namespaces, scope;
|
114
|
-
namespaces = klass.split(
|
132
|
+
namespaces = klass.split(".");
|
115
133
|
scope = root;
|
116
134
|
for (i = j = 0, len = namespaces.length; j < len; i = ++j) {
|
117
135
|
namespace = namespaces[i];
|
@@ -126,6 +144,8 @@
|
|
126
144
|
|
127
145
|
})();
|
128
146
|
|
147
|
+
Teaspoon.setupErrorHandler();
|
148
|
+
|
129
149
|
}).call(this);
|
130
150
|
(function() {
|
131
151
|
Teaspoon.Mixins || (Teaspoon.Mixins = {});
|
@@ -350,7 +370,7 @@
|
|
350
370
|
create();
|
351
371
|
}
|
352
372
|
if (jQueryAvailable()) {
|
353
|
-
parsed =
|
373
|
+
parsed = jQuery(jQuery.parseHTML(content, document, true));
|
354
374
|
results = [];
|
355
375
|
for (i = j = 0, ref = parsed.length; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) {
|
356
376
|
results.push(window.fixture.el.appendChild(parsed[i]));
|
@@ -365,7 +385,7 @@
|
|
365
385
|
var ref;
|
366
386
|
window.fixture.el = document.createElement("div");
|
367
387
|
if (jQueryAvailable()) {
|
368
|
-
window.fixture.$el =
|
388
|
+
window.fixture.$el = jQuery(window.fixture.el);
|
369
389
|
}
|
370
390
|
window.fixture.el.id = "teaspoon-fixtures";
|
371
391
|
return (ref = document.body) != null ? ref.appendChild(window.fixture.el) : void 0;
|
@@ -383,18 +403,18 @@
|
|
383
403
|
};
|
384
404
|
|
385
405
|
xhrRequest = function(url, callback) {
|
386
|
-
var e;
|
406
|
+
var e, error, error1;
|
387
407
|
if (window.XMLHttpRequest) {
|
388
408
|
xhr = new XMLHttpRequest();
|
389
409
|
} else if (window.ActiveXObject) {
|
390
410
|
try {
|
391
411
|
xhr = new ActiveXObject("Msxml2.XMLHTTP");
|
392
|
-
} catch (
|
393
|
-
e =
|
412
|
+
} catch (error) {
|
413
|
+
e = error;
|
394
414
|
try {
|
395
415
|
xhr = new ActiveXObject("Microsoft.XMLHTTP");
|
396
|
-
} catch (
|
397
|
-
e =
|
416
|
+
} catch (error1) {
|
417
|
+
e = error1;
|
398
418
|
}
|
399
419
|
}
|
400
420
|
}
|
@@ -407,7 +427,7 @@
|
|
407
427
|
};
|
408
428
|
|
409
429
|
jQueryAvailable = function() {
|
410
|
-
return typeof window
|
430
|
+
return typeof window.jQuery === 'function';
|
411
431
|
};
|
412
432
|
|
413
433
|
return Fixture;
|
@@ -423,18 +443,18 @@
|
|
423
443
|
}
|
424
444
|
xhr = null;
|
425
445
|
xhrRequest = function(url, payload, callback) {
|
426
|
-
var e;
|
446
|
+
var e, error, error1;
|
427
447
|
if (window.XMLHttpRequest) {
|
428
448
|
xhr = new XMLHttpRequest();
|
429
449
|
} else if (window.ActiveXObject) {
|
430
450
|
try {
|
431
451
|
xhr = new ActiveXObject("Msxml2.XMLHTTP");
|
432
|
-
} catch (
|
433
|
-
e =
|
452
|
+
} catch (error) {
|
453
|
+
e = error;
|
434
454
|
try {
|
435
455
|
xhr = new ActiveXObject("Microsoft.XMLHTTP");
|
436
|
-
} catch (
|
437
|
-
e =
|
456
|
+
} catch (error1) {
|
457
|
+
e = error1;
|
438
458
|
}
|
439
459
|
}
|
440
460
|
}
|
@@ -452,8 +472,8 @@
|
|
452
472
|
if (xhr.readyState !== 4) {
|
453
473
|
return;
|
454
474
|
}
|
455
|
-
if (xhr.status !== 200) {
|
456
|
-
throw
|
475
|
+
if (xhr.status !== 200 && xhr.status !== 500) {
|
476
|
+
throw JSON.parse(xhr.response).err;
|
457
477
|
}
|
458
478
|
});
|
459
479
|
};
|
@@ -898,7 +918,7 @@
|
|
898
918
|
};
|
899
919
|
|
900
920
|
RadialProgressView.prototype.appendTo = function() {
|
901
|
-
var canvas, e;
|
921
|
+
var canvas, e, error;
|
902
922
|
RadialProgressView.__super__.appendTo.apply(this, arguments);
|
903
923
|
this.size = 80;
|
904
924
|
try {
|
@@ -907,8 +927,8 @@
|
|
907
927
|
this.ctx = canvas.getContext("2d");
|
908
928
|
this.ctx.strokeStyle = "#fff";
|
909
929
|
return this.ctx.lineWidth = 1.5;
|
910
|
-
} catch (
|
911
|
-
e =
|
930
|
+
} catch (error) {
|
931
|
+
e = error;
|
912
932
|
}
|
913
933
|
};
|
914
934
|
|
@@ -35,6 +35,24 @@
|
|
35
35
|
return new (Teaspoon.resolveClass("Runner"))();
|
36
36
|
};
|
37
37
|
|
38
|
+
Teaspoon.setupErrorHandler = function() {
|
39
|
+
var originalOnError;
|
40
|
+
originalOnError = window.onerror;
|
41
|
+
return window.onerror = function(message) {
|
42
|
+
if (originalOnError && originalOnError.call) {
|
43
|
+
originalOnError.apply(null, arguments);
|
44
|
+
}
|
45
|
+
if (Teaspoon.started) {
|
46
|
+
return;
|
47
|
+
}
|
48
|
+
return Teaspoon.messages.push(JSON.stringify({
|
49
|
+
_teaspoon: true,
|
50
|
+
type: "exception",
|
51
|
+
message: message
|
52
|
+
}));
|
53
|
+
};
|
54
|
+
};
|
55
|
+
|
38
56
|
Teaspoon.reload = function() {
|
39
57
|
return window.location.reload();
|
40
58
|
};
|
@@ -77,12 +95,12 @@
|
|
77
95
|
};
|
78
96
|
|
79
97
|
Teaspoon.log = function() {
|
80
|
-
var e;
|
98
|
+
var e, error;
|
81
99
|
Teaspoon.messages.push(arguments[0]);
|
82
100
|
try {
|
83
101
|
return typeof console !== "undefined" && console !== null ? typeof console.log === "function" ? console.log.apply(console, arguments) : void 0 : void 0;
|
84
|
-
} catch (
|
85
|
-
e =
|
102
|
+
} catch (error) {
|
103
|
+
e = error;
|
86
104
|
throw new Error("Unable to use console.log for logging");
|
87
105
|
}
|
88
106
|
};
|
@@ -111,7 +129,7 @@
|
|
111
129
|
|
112
130
|
Teaspoon.checkNamespace = function(root, klass) {
|
113
131
|
var i, j, len, namespace, namespaces, scope;
|
114
|
-
namespaces = klass.split(
|
132
|
+
namespaces = klass.split(".");
|
115
133
|
scope = root;
|
116
134
|
for (i = j = 0, len = namespaces.length; j < len; i = ++j) {
|
117
135
|
namespace = namespaces[i];
|
@@ -126,6 +144,8 @@
|
|
126
144
|
|
127
145
|
})();
|
128
146
|
|
147
|
+
Teaspoon.setupErrorHandler();
|
148
|
+
|
129
149
|
}).call(this);
|
130
150
|
(function() {
|
131
151
|
Teaspoon.Mixins || (Teaspoon.Mixins = {});
|
@@ -350,7 +370,7 @@
|
|
350
370
|
create();
|
351
371
|
}
|
352
372
|
if (jQueryAvailable()) {
|
353
|
-
parsed =
|
373
|
+
parsed = jQuery(jQuery.parseHTML(content, document, true));
|
354
374
|
results = [];
|
355
375
|
for (i = j = 0, ref = parsed.length; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) {
|
356
376
|
results.push(window.fixture.el.appendChild(parsed[i]));
|
@@ -365,7 +385,7 @@
|
|
365
385
|
var ref;
|
366
386
|
window.fixture.el = document.createElement("div");
|
367
387
|
if (jQueryAvailable()) {
|
368
|
-
window.fixture.$el =
|
388
|
+
window.fixture.$el = jQuery(window.fixture.el);
|
369
389
|
}
|
370
390
|
window.fixture.el.id = "teaspoon-fixtures";
|
371
391
|
return (ref = document.body) != null ? ref.appendChild(window.fixture.el) : void 0;
|
@@ -383,18 +403,18 @@
|
|
383
403
|
};
|
384
404
|
|
385
405
|
xhrRequest = function(url, callback) {
|
386
|
-
var e;
|
406
|
+
var e, error, error1;
|
387
407
|
if (window.XMLHttpRequest) {
|
388
408
|
xhr = new XMLHttpRequest();
|
389
409
|
} else if (window.ActiveXObject) {
|
390
410
|
try {
|
391
411
|
xhr = new ActiveXObject("Msxml2.XMLHTTP");
|
392
|
-
} catch (
|
393
|
-
e =
|
412
|
+
} catch (error) {
|
413
|
+
e = error;
|
394
414
|
try {
|
395
415
|
xhr = new ActiveXObject("Microsoft.XMLHTTP");
|
396
|
-
} catch (
|
397
|
-
e =
|
416
|
+
} catch (error1) {
|
417
|
+
e = error1;
|
398
418
|
}
|
399
419
|
}
|
400
420
|
}
|
@@ -407,7 +427,7 @@
|
|
407
427
|
};
|
408
428
|
|
409
429
|
jQueryAvailable = function() {
|
410
|
-
return typeof window
|
430
|
+
return typeof window.jQuery === 'function';
|
411
431
|
};
|
412
432
|
|
413
433
|
return Fixture;
|
@@ -423,18 +443,18 @@
|
|
423
443
|
}
|
424
444
|
xhr = null;
|
425
445
|
xhrRequest = function(url, payload, callback) {
|
426
|
-
var e;
|
446
|
+
var e, error, error1;
|
427
447
|
if (window.XMLHttpRequest) {
|
428
448
|
xhr = new XMLHttpRequest();
|
429
449
|
} else if (window.ActiveXObject) {
|
430
450
|
try {
|
431
451
|
xhr = new ActiveXObject("Msxml2.XMLHTTP");
|
432
|
-
} catch (
|
433
|
-
e =
|
452
|
+
} catch (error) {
|
453
|
+
e = error;
|
434
454
|
try {
|
435
455
|
xhr = new ActiveXObject("Microsoft.XMLHTTP");
|
436
|
-
} catch (
|
437
|
-
e =
|
456
|
+
} catch (error1) {
|
457
|
+
e = error1;
|
438
458
|
}
|
439
459
|
}
|
440
460
|
}
|
@@ -453,7 +473,7 @@
|
|
453
473
|
return;
|
454
474
|
}
|
455
475
|
if (xhr.status !== 200) {
|
456
|
-
throw
|
476
|
+
throw JSON.parse(xhr.response).err;
|
457
477
|
}
|
458
478
|
});
|
459
479
|
};
|
@@ -898,7 +918,7 @@
|
|
898
918
|
};
|
899
919
|
|
900
920
|
RadialProgressView.prototype.appendTo = function() {
|
901
|
-
var canvas, e;
|
921
|
+
var canvas, e, error;
|
902
922
|
RadialProgressView.__super__.appendTo.apply(this, arguments);
|
903
923
|
this.size = 80;
|
904
924
|
try {
|
@@ -907,8 +927,8 @@
|
|
907
927
|
this.ctx = canvas.getContext("2d");
|
908
928
|
this.ctx.strokeStyle = "#fff";
|
909
929
|
return this.ctx.lineWidth = 1.5;
|
910
|
-
} catch (
|
911
|
-
e =
|
930
|
+
} catch (error) {
|
931
|
+
e = error;
|
912
932
|
}
|
913
933
|
};
|
914
934
|
|
@@ -11,7 +11,7 @@ module Teaspoon
|
|
11
11
|
dependencies: ["teaspoon-jasmine1.js"],
|
12
12
|
dev_deps: ["teaspoon/jasmine1.js"]
|
13
13
|
|
14
|
-
versions = ["2.0.3", "2.1.3", "2.2.0", "2.2.1", "2.3.4"]
|
14
|
+
versions = ["2.0.3", "2.1.3", "2.2.0", "2.2.1", "2.3.4", "2.4.1", "2.9.1"]
|
15
15
|
|
16
16
|
versions.each do |version|
|
17
17
|
register_version version, "jasmine/#{version}.js",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
# setTimeout(Teaspoon.execute, 1000)
|
22
22
|
#
|
23
23
|
# Matching files
|
24
|
-
# By default Teaspoon will look for files that match _spec.{js,js.coffee
|
24
|
+
# By default Teaspoon will look for files that match _spec.{js,js.coffee,coffee}. Add a filename_spec.js file in your
|
25
25
|
# spec path and it'll be included in the default suite automatically. If you want to customize suites, check out the
|
26
26
|
# configuration in teaspoon_env.rb
|
27
27
|
#
|
@@ -29,4 +29,4 @@
|
|
29
29
|
# If you'd rather require your spec files manually (to control order for instance) you can disable the suite matcher in
|
30
30
|
# the configuration and use this file as a manifest.
|
31
31
|
#
|
32
|
-
# For more information: http://github.com/
|
32
|
+
# For more information: http://github.com/jejacks0n/teaspoon
|
@@ -21,7 +21,7 @@
|
|
21
21
|
// setTimeout(Teaspoon.execute, 1000)
|
22
22
|
//
|
23
23
|
// Matching files
|
24
|
-
// By default Teaspoon will look for files that match _spec.{js,js.coffee
|
24
|
+
// By default Teaspoon will look for files that match _spec.{js,js.coffee,coffee}. Add a filename_spec.js file in your
|
25
25
|
// spec path and it'll be included in the default suite automatically. If you want to customize suites, check out the
|
26
26
|
// configuration in teaspoon_env.rb
|
27
27
|
//
|
@@ -29,4 +29,4 @@
|
|
29
29
|
// If you'd rather require your spec files manually (to control order for instance) you can disable the suite matcher in
|
30
30
|
// the configuration and use this file as a manifest.
|
31
31
|
//
|
32
|
-
// For more information: http://github.com/
|
32
|
+
// For more information: http://github.com/jejacks0n/teaspoon
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teaspoon-jasmine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jejacks0n
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-03-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: teaspoon
|
@@ -28,7 +28,7 @@ dependencies:
|
|
28
28
|
description: Run Jasmine specs in the browser or headless with PhantomJS, Selenium
|
29
29
|
Webdriver, or Capybara Webkit
|
30
30
|
email:
|
31
|
-
-
|
31
|
+
- jejacks0n@gmail.com
|
32
32
|
executables: []
|
33
33
|
extensions: []
|
34
34
|
extra_rdoc_files: []
|
@@ -40,6 +40,8 @@ files:
|
|
40
40
|
- lib/teaspoon/jasmine/assets/jasmine/2.2.0.js
|
41
41
|
- lib/teaspoon/jasmine/assets/jasmine/2.2.1.js
|
42
42
|
- lib/teaspoon/jasmine/assets/jasmine/2.3.4.js
|
43
|
+
- lib/teaspoon/jasmine/assets/jasmine/2.4.1.js
|
44
|
+
- lib/teaspoon/jasmine/assets/jasmine/2.9.1.js
|
43
45
|
- lib/teaspoon/jasmine/assets/jasmine/MIT.LICENSE
|
44
46
|
- lib/teaspoon/jasmine/assets/support/jasmine-jquery-1.7.0.js
|
45
47
|
- lib/teaspoon/jasmine/assets/support/jasmine-jquery-2.0.0.js
|
@@ -66,7 +68,7 @@ files:
|
|
66
68
|
- lib/teaspoon/jasmine/templates/spec_helper.coffee
|
67
69
|
- lib/teaspoon/jasmine/templates/spec_helper.js
|
68
70
|
- lib/teaspoon/jasmine/version.rb
|
69
|
-
homepage: https://github.com/
|
71
|
+
homepage: https://github.com/jejacks0n/teaspoon
|
70
72
|
licenses:
|
71
73
|
- MIT
|
72
74
|
metadata: {}
|
@@ -85,8 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
85
87
|
- !ruby/object:Gem::Version
|
86
88
|
version: '0'
|
87
89
|
requirements: []
|
88
|
-
|
89
|
-
rubygems_version: 2.4.6
|
90
|
+
rubygems_version: 3.0.8
|
90
91
|
signing_key:
|
91
92
|
specification_version: 4
|
92
93
|
summary: 'Teaspoon Jasmine: A Javascript test runner built on top of Rails for Jasmine'
|