jasmine-core 2.9.0 → 2.99.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/jasmine-core/jasmine-html.js +24 -1
- data/lib/jasmine-core/jasmine.css +1 -0
- data/lib/jasmine-core/jasmine.js +50 -6
- data/lib/jasmine-core/version.rb +1 -1
- metadata +3 -84
- data/lib/jasmine-core/spec/console/ConsoleReporterSpec.js +0 -270
- data/lib/jasmine-core/spec/core/CallTrackerSpec.js +0 -130
- data/lib/jasmine-core/spec/core/ClearStackSpec.js +0 -137
- data/lib/jasmine-core/spec/core/ClockSpec.js +0 -754
- data/lib/jasmine-core/spec/core/DelayedFunctionSchedulerSpec.js +0 -270
- data/lib/jasmine-core/spec/core/EnvSpec.js +0 -200
- data/lib/jasmine-core/spec/core/ExceptionFormatterSpec.js +0 -63
- data/lib/jasmine-core/spec/core/ExceptionsSpec.js +0 -68
- data/lib/jasmine-core/spec/core/ExpectationResultSpec.js +0 -61
- data/lib/jasmine-core/spec/core/ExpectationSpec.js +0 -434
- data/lib/jasmine-core/spec/core/GlobalErrorsSpec.js +0 -110
- data/lib/jasmine-core/spec/core/JsApiReporterSpec.js +0 -259
- data/lib/jasmine-core/spec/core/MockDateSpec.js +0 -200
- data/lib/jasmine-core/spec/core/PrettyPrintSpec.js +0 -337
- data/lib/jasmine-core/spec/core/QueueRunnerSpec.js +0 -620
- data/lib/jasmine-core/spec/core/ReportDispatcherSpec.js +0 -79
- data/lib/jasmine-core/spec/core/SpecSpec.js +0 -441
- data/lib/jasmine-core/spec/core/SpyRegistrySpec.js +0 -356
- data/lib/jasmine-core/spec/core/SpySpec.js +0 -127
- data/lib/jasmine-core/spec/core/SpyStrategySpec.js +0 -159
- data/lib/jasmine-core/spec/core/SuiteSpec.js +0 -155
- data/lib/jasmine-core/spec/core/TimerSpec.js +0 -31
- data/lib/jasmine-core/spec/core/TreeProcessorSpec.js +0 -756
- data/lib/jasmine-core/spec/core/UserContextSpec.js +0 -54
- data/lib/jasmine-core/spec/core/UtilSpec.js +0 -99
- data/lib/jasmine-core/spec/core/asymmetric_equality/AnySpec.js +0 -84
- data/lib/jasmine-core/spec/core/asymmetric_equality/AnythingSpec.js +0 -76
- data/lib/jasmine-core/spec/core/asymmetric_equality/ArrayContainingSpec.js +0 -52
- data/lib/jasmine-core/spec/core/asymmetric_equality/ArrayWithExactContentsSpec.js +0 -47
- data/lib/jasmine-core/spec/core/asymmetric_equality/ObjectContainingSpec.js +0 -102
- data/lib/jasmine-core/spec/core/asymmetric_equality/StringMatchingSpec.js +0 -27
- data/lib/jasmine-core/spec/core/formatErrorMsgSpec.js +0 -13
- data/lib/jasmine-core/spec/core/integration/CustomMatchersSpec.js +0 -199
- data/lib/jasmine-core/spec/core/integration/EnvSpec.js +0 -2007
- data/lib/jasmine-core/spec/core/integration/SpecRunningSpec.js +0 -950
- data/lib/jasmine-core/spec/core/matchers/DiffBuilderSpec.js +0 -47
- data/lib/jasmine-core/spec/core/matchers/NullDiffBuilderSpec.js +0 -13
- data/lib/jasmine-core/spec/core/matchers/ObjectPathSpec.js +0 -43
- data/lib/jasmine-core/spec/core/matchers/matchersUtilSpec.js +0 -658
- data/lib/jasmine-core/spec/core/matchers/nothingSpec.js +0 -8
- data/lib/jasmine-core/spec/core/matchers/toBeCloseToSpec.js +0 -93
- data/lib/jasmine-core/spec/core/matchers/toBeDefinedSpec.js +0 -18
- data/lib/jasmine-core/spec/core/matchers/toBeFalsySpec.js +0 -38
- data/lib/jasmine-core/spec/core/matchers/toBeGreaterThanOrEqualSpec.js +0 -29
- data/lib/jasmine-core/spec/core/matchers/toBeGreaterThanSpec.js +0 -20
- data/lib/jasmine-core/spec/core/matchers/toBeLessThanOrEqualSpec.js +0 -29
- data/lib/jasmine-core/spec/core/matchers/toBeLessThanSpec.js +0 -20
- data/lib/jasmine-core/spec/core/matchers/toBeNaNSpec.js +0 -37
- data/lib/jasmine-core/spec/core/matchers/toBeNegativeInfinitySpec.js +0 -31
- data/lib/jasmine-core/spec/core/matchers/toBeNullSpec.js +0 -17
- data/lib/jasmine-core/spec/core/matchers/toBePositiveInfinitySpec.js +0 -31
- data/lib/jasmine-core/spec/core/matchers/toBeSpec.js +0 -17
- data/lib/jasmine-core/spec/core/matchers/toBeTruthySpec.js +0 -38
- data/lib/jasmine-core/spec/core/matchers/toBeUndefinedSpec.js +0 -18
- data/lib/jasmine-core/spec/core/matchers/toContainSpec.js +0 -26
- data/lib/jasmine-core/spec/core/matchers/toEqualSpec.js +0 -804
- data/lib/jasmine-core/spec/core/matchers/toHaveBeenCalledBeforeSpec.js +0 -99
- data/lib/jasmine-core/spec/core/matchers/toHaveBeenCalledSpec.js +0 -47
- data/lib/jasmine-core/spec/core/matchers/toHaveBeenCalledTimesSpec.js +0 -86
- data/lib/jasmine-core/spec/core/matchers/toHaveBeenCalledWithSpec.js +0 -67
- data/lib/jasmine-core/spec/core/matchers/toMatchSpec.js +0 -43
- data/lib/jasmine-core/spec/core/matchers/toThrowErrorSpec.js +0 -315
- data/lib/jasmine-core/spec/core/matchers/toThrowSpec.js +0 -100
- data/lib/jasmine-core/spec/helpers/BrowserFlags.js +0 -27
- data/lib/jasmine-core/spec/helpers/asyncAwait.js +0 -27
- data/lib/jasmine-core/spec/helpers/checkForMap.js +0 -37
- data/lib/jasmine-core/spec/helpers/checkForSet.js +0 -41
- data/lib/jasmine-core/spec/helpers/checkForSymbol.js +0 -28
- data/lib/jasmine-core/spec/helpers/checkForTypedArrays.js +0 -20
- data/lib/jasmine-core/spec/helpers/defineJasmineUnderTest.js +0 -7
- data/lib/jasmine-core/spec/helpers/nodeDefineJasmineUnderTest.js +0 -33
- data/lib/jasmine-core/spec/html/HtmlReporterSpec.js +0 -982
- data/lib/jasmine-core/spec/html/HtmlSpecFilterSpec.js +0 -18
- data/lib/jasmine-core/spec/html/MatchersHtmlSpec.js +0 -37
- data/lib/jasmine-core/spec/html/PrettyPrintHtmlSpec.js +0 -15
- data/lib/jasmine-core/spec/html/QueryStringSpec.js +0 -72
- data/lib/jasmine-core/spec/html/ResultsNodeSpec.js +0 -62
- data/lib/jasmine-core/spec/html/SpyRegistryHtmlSpec.js +0 -34
- data/lib/jasmine-core/spec/npmPackage/npmPackageSpec.js +0 -101
- data/lib/jasmine-core/spec/performance/large_object_test.js +0 -36
- data/lib/jasmine-core/spec/performance/performance_test.js +0 -10
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
describe("Suite", function() {
|
|
2
|
-
|
|
3
|
-
it("keeps its id", function() {
|
|
4
|
-
var env = new jasmineUnderTest.Env(),
|
|
5
|
-
suite = new jasmineUnderTest.Suite({
|
|
6
|
-
env: env,
|
|
7
|
-
id: 456,
|
|
8
|
-
description: "I am a suite"
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
expect(suite.id).toEqual(456);
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
it("returns blank full name for top level suite", function() {
|
|
15
|
-
var env = new jasmineUnderTest.Env(),
|
|
16
|
-
suite = new jasmineUnderTest.Suite({
|
|
17
|
-
env: env,
|
|
18
|
-
description: "I am a suite"
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
expect(suite.getFullName()).toEqual("");
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it("returns its full name when it has parent suites", function() {
|
|
25
|
-
var env = new jasmineUnderTest.Env(),
|
|
26
|
-
parentSuite = new jasmineUnderTest.Suite({
|
|
27
|
-
env: env,
|
|
28
|
-
description: "I am a parent suite",
|
|
29
|
-
parentSuite: jasmine.createSpy('pretend top level suite')
|
|
30
|
-
}),
|
|
31
|
-
suite = new jasmineUnderTest.Suite({
|
|
32
|
-
env: env,
|
|
33
|
-
description: "I am a suite",
|
|
34
|
-
parentSuite: parentSuite
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
expect(suite.getFullName()).toEqual("I am a parent suite I am a suite");
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
it("adds before functions in order of needed execution", function() {
|
|
41
|
-
var env = new jasmineUnderTest.Env(),
|
|
42
|
-
suite = new jasmineUnderTest.Suite({
|
|
43
|
-
env: env,
|
|
44
|
-
description: "I am a suite"
|
|
45
|
-
}),
|
|
46
|
-
outerBefore = jasmine.createSpy('outerBeforeEach'),
|
|
47
|
-
innerBefore = jasmine.createSpy('insideBeforeEach');
|
|
48
|
-
|
|
49
|
-
suite.beforeEach(outerBefore);
|
|
50
|
-
suite.beforeEach(innerBefore);
|
|
51
|
-
|
|
52
|
-
expect(suite.beforeFns).toEqual([innerBefore, outerBefore]);
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
it("adds after functions in order of needed execution", function() {
|
|
56
|
-
var env = new jasmineUnderTest.Env(),
|
|
57
|
-
suite = new jasmineUnderTest.Suite({
|
|
58
|
-
env: env,
|
|
59
|
-
description: "I am a suite"
|
|
60
|
-
}),
|
|
61
|
-
outerAfter = jasmine.createSpy('outerAfterEach'),
|
|
62
|
-
innerAfter = jasmine.createSpy('insideAfterEach');
|
|
63
|
-
|
|
64
|
-
suite.afterEach(outerAfter);
|
|
65
|
-
suite.afterEach(innerAfter);
|
|
66
|
-
|
|
67
|
-
expect(suite.afterFns).toEqual([innerAfter, outerAfter]);
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
it('has a status of failed if any afterAll expectations have failed', function() {
|
|
71
|
-
var suite = new jasmineUnderTest.Suite({
|
|
72
|
-
expectationResultFactory: function() { return 'hi'; }
|
|
73
|
-
});
|
|
74
|
-
suite.addChild({ result: { status: 'done' } });
|
|
75
|
-
|
|
76
|
-
suite.addExpectationResult(false);
|
|
77
|
-
expect(suite.status()).toBe('failed');
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
it("retrieves a result with updated status", function() {
|
|
81
|
-
var suite = new jasmineUnderTest.Suite({});
|
|
82
|
-
|
|
83
|
-
expect(suite.getResult().status).toBe('finished');
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
it("retrieves a result with pending status", function() {
|
|
87
|
-
var suite = new jasmineUnderTest.Suite({});
|
|
88
|
-
suite.pend();
|
|
89
|
-
|
|
90
|
-
expect(suite.getResult().status).toBe('pending');
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
it("is executable if not pending", function() {
|
|
94
|
-
var suite = new jasmineUnderTest.Suite({});
|
|
95
|
-
|
|
96
|
-
expect(suite.isExecutable()).toBe(true);
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
it("is not executable if pending", function() {
|
|
100
|
-
var suite = new jasmineUnderTest.Suite({});
|
|
101
|
-
suite.pend();
|
|
102
|
-
|
|
103
|
-
expect(suite.isExecutable()).toBe(false);
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
it("tells all children about expectation failures, even if one throws", function() {
|
|
107
|
-
var suite = new jasmineUnderTest.Suite({}),
|
|
108
|
-
child1 = { addExpectationResult: jasmine.createSpy('child1#expectationResult'), result: {} },
|
|
109
|
-
child2 = { addExpectationResult: jasmine.createSpy('child2#expectationResult'), result: {} };
|
|
110
|
-
|
|
111
|
-
suite.addChild(child1);
|
|
112
|
-
suite.addChild(child2);
|
|
113
|
-
|
|
114
|
-
child1.addExpectationResult.and.throwError('foo');
|
|
115
|
-
|
|
116
|
-
suite.addExpectationResult('stuff');
|
|
117
|
-
|
|
118
|
-
expect(child1.addExpectationResult).toHaveBeenCalledWith('stuff');
|
|
119
|
-
expect(child2.addExpectationResult).toHaveBeenCalledWith('stuff');
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
it("throws an ExpectationFailed when receiving a failed expectation in an afterAll when throwOnExpectationFailure is set", function() {
|
|
123
|
-
var suite = new jasmineUnderTest.Suite({
|
|
124
|
-
expectationResultFactory: function(data) { return data; },
|
|
125
|
-
throwOnExpectationFailure: true
|
|
126
|
-
});
|
|
127
|
-
suite.addChild({ result: { status: 'done' } });
|
|
128
|
-
|
|
129
|
-
expect(function() {
|
|
130
|
-
suite.addExpectationResult(false, 'failed');
|
|
131
|
-
}).toThrowError(jasmineUnderTest.errors.ExpectationFailed);
|
|
132
|
-
|
|
133
|
-
expect(suite.status()).toBe('failed');
|
|
134
|
-
expect(suite.result.failedExpectations).toEqual(['failed']);
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
it("does not add an additional failure when an expectation fails in an afterAll", function(){
|
|
138
|
-
var suite = new jasmineUnderTest.Suite({});
|
|
139
|
-
suite.addChild({ result: { status: 'done' } });
|
|
140
|
-
|
|
141
|
-
suite.onException(new jasmineUnderTest.errors.ExpectationFailed());
|
|
142
|
-
|
|
143
|
-
expect(suite.getResult().failedExpectations).toEqual([]);
|
|
144
|
-
});
|
|
145
|
-
|
|
146
|
-
describe('#sharedUserContext', function() {
|
|
147
|
-
beforeEach(function() {
|
|
148
|
-
this.suite = new jasmineUnderTest.Suite({});
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
it('returns a UserContext', function() {
|
|
152
|
-
expect(this.suite.sharedUserContext().constructor).toBe(jasmineUnderTest.UserContext);
|
|
153
|
-
});
|
|
154
|
-
});
|
|
155
|
-
});
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
describe("Timer", function() {
|
|
2
|
-
it("reports the time elapsed", function() {
|
|
3
|
-
var fakeNow = jasmine.createSpy('fake Date.now'),
|
|
4
|
-
timer = new jasmineUnderTest.Timer({now: fakeNow});
|
|
5
|
-
|
|
6
|
-
fakeNow.and.returnValue(100);
|
|
7
|
-
timer.start();
|
|
8
|
-
|
|
9
|
-
fakeNow.and.returnValue(200);
|
|
10
|
-
|
|
11
|
-
expect(timer.elapsed()).toEqual(100);
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
describe("when date is stubbed, perhaps by other testing helpers", function() {
|
|
15
|
-
var origDate = Date;
|
|
16
|
-
beforeEach(function() {
|
|
17
|
-
Date = jasmine.createSpy('date spy');
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
afterEach(function() {
|
|
21
|
-
Date = origDate;
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it("does not throw even though Date was taken away", function() {
|
|
25
|
-
var timer = new jasmineUnderTest.Timer();
|
|
26
|
-
|
|
27
|
-
expect(timer.start).not.toThrow();
|
|
28
|
-
expect(timer.elapsed()).toEqual(jasmine.any(Number));
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
});
|