jasmine-core 2.4.1 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/console/console.js +1 -1
- data/lib/jasmine-core/boot.js +1 -1
- data/lib/jasmine-core/jasmine-html.js +15 -7
- data/lib/jasmine-core/jasmine.js +261 -82
- data/lib/jasmine-core/node_boot.js +1 -1
- data/lib/jasmine-core/spec/console/ConsoleReporterSpec.js +16 -16
- data/lib/jasmine-core/spec/core/CallTrackerSpec.js +26 -11
- data/lib/jasmine-core/spec/core/ClockSpec.js +61 -42
- data/lib/jasmine-core/spec/core/DelayedFunctionSchedulerSpec.js +28 -15
- data/lib/jasmine-core/spec/core/EnvSpec.js +8 -8
- data/lib/jasmine-core/spec/core/ExceptionFormatterSpec.js +6 -6
- data/lib/jasmine-core/spec/core/ExceptionsSpec.js +1 -1
- data/lib/jasmine-core/spec/core/ExpectationResultSpec.js +8 -8
- data/lib/jasmine-core/spec/core/ExpectationSpec.js +17 -17
- data/lib/jasmine-core/spec/core/JsApiReporterSpec.js +14 -14
- data/lib/jasmine-core/spec/core/MockDateSpec.js +14 -14
- data/lib/jasmine-core/spec/core/PrettyPrintSpec.js +65 -56
- data/lib/jasmine-core/spec/core/QueueRunnerSpec.js +32 -18
- data/lib/jasmine-core/spec/core/ReportDispatcherSpec.js +27 -3
- data/lib/jasmine-core/spec/core/SpecSpec.js +37 -37
- data/lib/jasmine-core/spec/core/SpyRegistrySpec.js +46 -7
- data/lib/jasmine-core/spec/core/SpySpec.js +11 -11
- data/lib/jasmine-core/spec/core/SpyStrategySpec.js +25 -13
- data/lib/jasmine-core/spec/core/SuiteSpec.js +25 -25
- data/lib/jasmine-core/spec/core/TimerSpec.js +2 -2
- data/lib/jasmine-core/spec/core/TreeProcessorSpec.js +26 -26
- data/lib/jasmine-core/spec/core/UtilSpec.js +12 -12
- data/lib/jasmine-core/spec/core/asymmetric_equality/AnySpec.js +8 -8
- data/lib/jasmine-core/spec/core/asymmetric_equality/AnythingSpec.js +7 -7
- data/lib/jasmine-core/spec/core/asymmetric_equality/ArrayContainingSpec.js +6 -6
- data/lib/jasmine-core/spec/core/asymmetric_equality/ObjectContainingSpec.js +11 -11
- data/lib/jasmine-core/spec/core/asymmetric_equality/StringMatchingSpec.js +4 -4
- data/lib/jasmine-core/spec/core/formatErrorMsgSpec.js +13 -0
- data/lib/jasmine-core/spec/core/integration/CustomMatchersSpec.js +2 -2
- data/lib/jasmine-core/spec/core/integration/EnvSpec.js +195 -76
- data/lib/jasmine-core/spec/core/integration/SpecRunningSpec.js +20 -21
- data/lib/jasmine-core/spec/core/matchers/matchersUtilSpec.js +164 -114
- data/lib/jasmine-core/spec/core/matchers/toBeCloseToSpec.js +4 -4
- data/lib/jasmine-core/spec/core/matchers/toBeDefinedSpec.js +2 -2
- data/lib/jasmine-core/spec/core/matchers/toBeFalsySpec.js +2 -2
- data/lib/jasmine-core/spec/core/matchers/toBeGreaterThanOrEqualSpec.js +29 -0
- data/lib/jasmine-core/spec/core/matchers/toBeGreaterThanSpec.js +2 -2
- data/lib/jasmine-core/spec/core/matchers/toBeLessThanOrEqualSpec.js +29 -0
- data/lib/jasmine-core/spec/core/matchers/toBeLessThanSpec.js +2 -2
- data/lib/jasmine-core/spec/core/matchers/toBeNaNSpec.js +3 -3
- data/lib/jasmine-core/spec/core/matchers/toBeNullSpec.js +2 -2
- data/lib/jasmine-core/spec/core/matchers/toBeSpec.js +2 -2
- data/lib/jasmine-core/spec/core/matchers/toBeTruthySpec.js +2 -2
- data/lib/jasmine-core/spec/core/matchers/toBeUndefinedSpec.js +2 -2
- data/lib/jasmine-core/spec/core/matchers/toContainSpec.js +4 -4
- data/lib/jasmine-core/spec/core/matchers/toEqualSpec.js +2 -2
- data/lib/jasmine-core/spec/core/matchers/toHaveBeenCalledSpec.js +11 -11
- data/lib/jasmine-core/spec/core/matchers/toHaveBeenCalledTimesSpec.js +22 -17
- data/lib/jasmine-core/spec/core/matchers/toHaveBeenCalledWithSpec.js +11 -10
- data/lib/jasmine-core/spec/core/matchers/toMatchSpec.js +7 -6
- data/lib/jasmine-core/spec/core/matchers/toThrowErrorSpec.js +24 -24
- data/lib/jasmine-core/spec/core/matchers/toThrowSpec.js +9 -8
- data/lib/jasmine-core/spec/helpers/defineJasmineUnderTest.js +3 -3
- data/lib/jasmine-core/spec/helpers/nodeDefineJasmineUnderTest.js +5 -5
- data/lib/jasmine-core/spec/html/HtmlReporterSpec.js +95 -59
- data/lib/jasmine-core/spec/html/HtmlSpecFilterSpec.js +3 -3
- data/lib/jasmine-core/spec/html/MatchersHtmlSpec.js +1 -1
- data/lib/jasmine-core/spec/html/PrettyPrintHtmlSpec.js +4 -4
- data/lib/jasmine-core/spec/html/QueryStringSpec.js +5 -5
- data/lib/jasmine-core/spec/html/ResultsNodeSpec.js +4 -4
- data/lib/jasmine-core/spec/npmPackage/npmPackageSpec.js +2 -2
- data/lib/jasmine-core/spec/performance/large_object_test.js +1 -1
- data/lib/jasmine-core/version.rb +1 -1
- metadata +5 -3
- data/lib/jasmine-core/spec/node_suite.js +0 -195
@@ -1,6 +1,6 @@
|
|
1
1
|
describe("DelayedFunctionScheduler", function() {
|
2
2
|
it("schedules a function for later execution", function() {
|
3
|
-
var scheduler = new
|
3
|
+
var scheduler = new jasmineUnderTest.DelayedFunctionScheduler(),
|
4
4
|
fn = jasmine.createSpy('fn');
|
5
5
|
|
6
6
|
scheduler.scheduleFunction(fn, 0);
|
@@ -13,7 +13,7 @@ describe("DelayedFunctionScheduler", function() {
|
|
13
13
|
});
|
14
14
|
|
15
15
|
it("schedules a string for later execution", function() {
|
16
|
-
var scheduler = new
|
16
|
+
var scheduler = new jasmineUnderTest.DelayedFunctionScheduler(),
|
17
17
|
strfn = "horrible = true;";
|
18
18
|
|
19
19
|
scheduler.scheduleFunction(strfn, 0);
|
@@ -24,7 +24,7 @@ describe("DelayedFunctionScheduler", function() {
|
|
24
24
|
});
|
25
25
|
|
26
26
|
it("#tick defaults to 0", function() {
|
27
|
-
var scheduler = new
|
27
|
+
var scheduler = new jasmineUnderTest.DelayedFunctionScheduler(),
|
28
28
|
fn = jasmine.createSpy('fn');
|
29
29
|
|
30
30
|
scheduler.scheduleFunction(fn, 0);
|
@@ -37,7 +37,7 @@ describe("DelayedFunctionScheduler", function() {
|
|
37
37
|
});
|
38
38
|
|
39
39
|
it("defaults delay to 0", function() {
|
40
|
-
var scheduler = new
|
40
|
+
var scheduler = new jasmineUnderTest.DelayedFunctionScheduler(),
|
41
41
|
fn = jasmine.createSpy('fn');
|
42
42
|
|
43
43
|
scheduler.scheduleFunction(fn);
|
@@ -50,7 +50,7 @@ describe("DelayedFunctionScheduler", function() {
|
|
50
50
|
});
|
51
51
|
|
52
52
|
it("optionally passes params to scheduled functions", function() {
|
53
|
-
var scheduler = new
|
53
|
+
var scheduler = new jasmineUnderTest.DelayedFunctionScheduler(),
|
54
54
|
fn = jasmine.createSpy('fn');
|
55
55
|
|
56
56
|
scheduler.scheduleFunction(fn, 0, ['foo', 'bar']);
|
@@ -63,7 +63,7 @@ describe("DelayedFunctionScheduler", function() {
|
|
63
63
|
});
|
64
64
|
|
65
65
|
it("scheduled fns can optionally reoccur", function() {
|
66
|
-
var scheduler = new
|
66
|
+
var scheduler = new jasmineUnderTest.DelayedFunctionScheduler(),
|
67
67
|
fn = jasmine.createSpy('fn');
|
68
68
|
|
69
69
|
scheduler.scheduleFunction(fn, 20, [], true);
|
@@ -85,7 +85,7 @@ describe("DelayedFunctionScheduler", function() {
|
|
85
85
|
});
|
86
86
|
|
87
87
|
it("increments scheduled fns ids unless one is passed", function() {
|
88
|
-
var scheduler = new
|
88
|
+
var scheduler = new jasmineUnderTest.DelayedFunctionScheduler();
|
89
89
|
|
90
90
|
expect(scheduler.scheduleFunction(function() {
|
91
91
|
}, 0)).toBe(1);
|
@@ -98,7 +98,7 @@ describe("DelayedFunctionScheduler", function() {
|
|
98
98
|
});
|
99
99
|
|
100
100
|
it("#removeFunctionWithId removes a previously scheduled function with a given id", function() {
|
101
|
-
var scheduler = new
|
101
|
+
var scheduler = new jasmineUnderTest.DelayedFunctionScheduler(),
|
102
102
|
fn = jasmine.createSpy('fn'),
|
103
103
|
timeoutKey;
|
104
104
|
|
@@ -114,7 +114,7 @@ describe("DelayedFunctionScheduler", function() {
|
|
114
114
|
});
|
115
115
|
|
116
116
|
it("executes recurring functions interleaved with regular functions in the correct order", function() {
|
117
|
-
var scheduler = new
|
117
|
+
var scheduler = new jasmineUnderTest.DelayedFunctionScheduler(),
|
118
118
|
fn = jasmine.createSpy('fn'),
|
119
119
|
recurringCallCount = 0,
|
120
120
|
recurring = jasmine.createSpy('recurring').and.callFake(function() {
|
@@ -135,7 +135,7 @@ describe("DelayedFunctionScheduler", function() {
|
|
135
135
|
});
|
136
136
|
|
137
137
|
it("schedules a function for later execution during a tick", function () {
|
138
|
-
var scheduler = new
|
138
|
+
var scheduler = new jasmineUnderTest.DelayedFunctionScheduler(),
|
139
139
|
fn = jasmine.createSpy('fn'),
|
140
140
|
fnDelay = 10;
|
141
141
|
|
@@ -151,7 +151,7 @@ describe("DelayedFunctionScheduler", function() {
|
|
151
151
|
});
|
152
152
|
|
153
153
|
it("#removeFunctionWithId removes a previously scheduled function with a given id during a tick", function () {
|
154
|
-
var scheduler = new
|
154
|
+
var scheduler = new jasmineUnderTest.DelayedFunctionScheduler(),
|
155
155
|
fn = jasmine.createSpy('fn'),
|
156
156
|
fnDelay = 10,
|
157
157
|
timeoutKey;
|
@@ -169,7 +169,7 @@ describe("DelayedFunctionScheduler", function() {
|
|
169
169
|
});
|
170
170
|
|
171
171
|
it("executes recurring functions interleaved with regular functions and functions scheduled during a tick in the correct order", function () {
|
172
|
-
var scheduler = new
|
172
|
+
var scheduler = new jasmineUnderTest.DelayedFunctionScheduler(),
|
173
173
|
fn = jasmine.createSpy('fn'),
|
174
174
|
recurringCallCount = 0,
|
175
175
|
recurring = jasmine.createSpy('recurring').and.callFake(function() {
|
@@ -202,7 +202,7 @@ describe("DelayedFunctionScheduler", function() {
|
|
202
202
|
});
|
203
203
|
|
204
204
|
it("executes recurring functions after rescheduling them", function () {
|
205
|
-
var scheduler = new
|
205
|
+
var scheduler = new jasmineUnderTest.DelayedFunctionScheduler(),
|
206
206
|
recurring = function() {
|
207
207
|
expect(scheduler.scheduleFunction).toHaveBeenCalled();
|
208
208
|
};
|
@@ -215,7 +215,7 @@ describe("DelayedFunctionScheduler", function() {
|
|
215
215
|
});
|
216
216
|
|
217
217
|
it("removes functions during a tick that runs the function", function() {
|
218
|
-
var scheduler = new
|
218
|
+
var scheduler = new jasmineUnderTest.DelayedFunctionScheduler(),
|
219
219
|
fn = jasmine.createSpy('fn'),
|
220
220
|
fnDelay = 10,
|
221
221
|
timeoutKey;
|
@@ -234,7 +234,7 @@ describe("DelayedFunctionScheduler", function() {
|
|
234
234
|
});
|
235
235
|
|
236
236
|
it("removes functions during the first tick that runs the function", function() {
|
237
|
-
var scheduler = new
|
237
|
+
var scheduler = new jasmineUnderTest.DelayedFunctionScheduler(),
|
238
238
|
fn = jasmine.createSpy('fn'),
|
239
239
|
fnDelay = 10,
|
240
240
|
timeoutKey;
|
@@ -251,5 +251,18 @@ describe("DelayedFunctionScheduler", function() {
|
|
251
251
|
expect(fn).toHaveBeenCalled();
|
252
252
|
expect(fn.calls.count()).toBe(1);
|
253
253
|
});
|
254
|
+
|
255
|
+
it("updates the mockDate per scheduled time", function () {
|
256
|
+
var scheduler = new jasmineUnderTest.DelayedFunctionScheduler(),
|
257
|
+
tickDate = jasmine.createSpy('tickDate');
|
258
|
+
|
259
|
+
scheduler.scheduleFunction(function() {});
|
260
|
+
scheduler.scheduleFunction(function() {}, 1);
|
261
|
+
|
262
|
+
scheduler.tick(1, tickDate);
|
263
|
+
|
264
|
+
expect(tickDate).toHaveBeenCalledWith(0);
|
265
|
+
expect(tickDate).toHaveBeenCalledWith(1);
|
266
|
+
})
|
254
267
|
});
|
255
268
|
|
@@ -2,20 +2,20 @@
|
|
2
2
|
describe("Env", function() {
|
3
3
|
var env;
|
4
4
|
beforeEach(function() {
|
5
|
-
env = new
|
5
|
+
env = new jasmineUnderTest.Env();
|
6
6
|
});
|
7
7
|
|
8
8
|
describe("#pending", function() {
|
9
9
|
it("throws the Pending Spec exception", function() {
|
10
10
|
expect(function() {
|
11
11
|
env.pending();
|
12
|
-
}).toThrow(
|
12
|
+
}).toThrow(jasmineUnderTest.Spec.pendingSpecExceptionMessage);
|
13
13
|
});
|
14
14
|
|
15
15
|
it("throws the Pending Spec exception with a custom message", function() {
|
16
16
|
expect(function() {
|
17
17
|
env.pending('custom message');
|
18
|
-
}).toThrow(
|
18
|
+
}).toThrow(jasmineUnderTest.Spec.pendingSpecExceptionMessage + 'custom message');
|
19
19
|
});
|
20
20
|
});
|
21
21
|
|
@@ -31,16 +31,16 @@ describe("Env", function() {
|
|
31
31
|
it("throws the error", function() {
|
32
32
|
expect(function() {
|
33
33
|
env.describe('done method', spec);
|
34
|
-
}).toThrow(new Error('describe does not expect
|
34
|
+
}).toThrow(new Error('describe does not expect any arguments'));
|
35
35
|
});
|
36
36
|
});
|
37
37
|
|
38
38
|
it('can configure specs to throw errors on expectation failures', function() {
|
39
39
|
env.throwOnExpectationFailure(true);
|
40
40
|
|
41
|
-
spyOn(
|
41
|
+
spyOn(jasmineUnderTest, 'Spec');
|
42
42
|
env.it('foo', function() {});
|
43
|
-
expect(
|
43
|
+
expect(jasmineUnderTest.Spec).toHaveBeenCalledWith(jasmine.objectContaining({
|
44
44
|
throwOnExpectationFailure: true
|
45
45
|
}));
|
46
46
|
});
|
@@ -48,9 +48,9 @@ describe("Env", function() {
|
|
48
48
|
it('can configure suites to throw errors on expectation failures', function() {
|
49
49
|
env.throwOnExpectationFailure(true);
|
50
50
|
|
51
|
-
spyOn(
|
51
|
+
spyOn(jasmineUnderTest, 'Suite');
|
52
52
|
env.describe('foo', function() {});
|
53
|
-
expect(
|
53
|
+
expect(jasmineUnderTest.Suite).toHaveBeenCalledWith(jasmine.objectContaining({
|
54
54
|
throwOnExpectationFailure: true
|
55
55
|
}));
|
56
56
|
});
|
@@ -7,7 +7,7 @@ describe("ExceptionFormatter", function() {
|
|
7
7
|
message: 'you got your foo in my bar',
|
8
8
|
name: 'A Classic Mistake'
|
9
9
|
},
|
10
|
-
exceptionFormatter = new
|
10
|
+
exceptionFormatter = new jasmineUnderTest.ExceptionFormatter(),
|
11
11
|
message = exceptionFormatter.message(sampleFirefoxException);
|
12
12
|
|
13
13
|
expect(message).toEqual('A Classic Mistake: you got your foo in my bar in foo.js (line 1978)');
|
@@ -20,7 +20,7 @@ describe("ExceptionFormatter", function() {
|
|
20
20
|
message: 'you got your foo in my bar',
|
21
21
|
name: 'A Classic Mistake'
|
22
22
|
},
|
23
|
-
exceptionFormatter = new
|
23
|
+
exceptionFormatter = new jasmineUnderTest.ExceptionFormatter(),
|
24
24
|
message = exceptionFormatter.message(sampleWebkitException);
|
25
25
|
|
26
26
|
expect(message).toEqual('A Classic Mistake: you got your foo in my bar in foo.js (line 1978)');
|
@@ -31,7 +31,7 @@ describe("ExceptionFormatter", function() {
|
|
31
31
|
message: 'you got your foo in my bar',
|
32
32
|
name: 'A Classic Mistake'
|
33
33
|
},
|
34
|
-
exceptionFormatter = new
|
34
|
+
exceptionFormatter = new jasmineUnderTest.ExceptionFormatter(),
|
35
35
|
message = exceptionFormatter.message(sampleV8);
|
36
36
|
|
37
37
|
expect(message).toEqual('A Classic Mistake: you got your foo in my bar');
|
@@ -39,7 +39,7 @@ describe("ExceptionFormatter", function() {
|
|
39
39
|
|
40
40
|
it("formats thrown exceptions that aren't errors", function() {
|
41
41
|
var thrown = "crazy error",
|
42
|
-
exceptionFormatter = new
|
42
|
+
exceptionFormatter = new jasmineUnderTest.ExceptionFormatter(),
|
43
43
|
message = exceptionFormatter.message(thrown);
|
44
44
|
|
45
45
|
expect(message).toEqual("crazy error thrown");
|
@@ -53,11 +53,11 @@ describe("ExceptionFormatter", function() {
|
|
53
53
|
var error;
|
54
54
|
try { throw new Error("an error") } catch(e) { error = e; }
|
55
55
|
|
56
|
-
expect(new
|
56
|
+
expect(new jasmineUnderTest.ExceptionFormatter().stack(error)).toMatch(/ExceptionFormatterSpec\.js.*\d+/)
|
57
57
|
});
|
58
58
|
|
59
59
|
it("returns null if no Error provided", function() {
|
60
|
-
expect(new
|
60
|
+
expect(new jasmineUnderTest.ExceptionFormatter().stack()).toBeNull();
|
61
61
|
});
|
62
62
|
});
|
63
63
|
});
|
@@ -1,16 +1,16 @@
|
|
1
1
|
describe("buildExpectationResult", function() {
|
2
2
|
it("defaults to passed", function() {
|
3
|
-
var result =
|
3
|
+
var result = jasmineUnderTest.buildExpectationResult({passed: 'some-value'});
|
4
4
|
expect(result.passed).toBe('some-value');
|
5
5
|
});
|
6
6
|
|
7
7
|
it("message defaults to Passed for passing specs", function() {
|
8
|
-
var result =
|
8
|
+
var result = jasmineUnderTest.buildExpectationResult({passed: true, message: 'some-value'});
|
9
9
|
expect(result.message).toBe('Passed.');
|
10
10
|
});
|
11
11
|
|
12
12
|
it("message returns the message for failing expectations", function() {
|
13
|
-
var result =
|
13
|
+
var result = jasmineUnderTest.buildExpectationResult({passed: false, message: 'some-value'});
|
14
14
|
expect(result.message).toBe('some-value');
|
15
15
|
});
|
16
16
|
|
@@ -18,7 +18,7 @@ describe("buildExpectationResult", function() {
|
|
18
18
|
var fakeError = {message: 'foo'},
|
19
19
|
messageFormatter = jasmine.createSpy("exception message formatter").and.returnValue(fakeError.message);
|
20
20
|
|
21
|
-
var result =
|
21
|
+
var result = jasmineUnderTest.buildExpectationResult(
|
22
22
|
{
|
23
23
|
passed: false,
|
24
24
|
error: fakeError,
|
@@ -33,7 +33,7 @@ describe("buildExpectationResult", function() {
|
|
33
33
|
var fakeError = {stack: 'foo'},
|
34
34
|
stackFormatter = jasmine.createSpy("stack formatter").and.returnValue(fakeError.stack);
|
35
35
|
|
36
|
-
var result =
|
36
|
+
var result = jasmineUnderTest.buildExpectationResult(
|
37
37
|
{
|
38
38
|
passed: false,
|
39
39
|
error: fakeError,
|
@@ -45,17 +45,17 @@ describe("buildExpectationResult", function() {
|
|
45
45
|
});
|
46
46
|
|
47
47
|
it("matcherName returns passed matcherName", function() {
|
48
|
-
var result =
|
48
|
+
var result = jasmineUnderTest.buildExpectationResult({matcherName: 'some-value'});
|
49
49
|
expect(result.matcherName).toBe('some-value');
|
50
50
|
});
|
51
51
|
|
52
52
|
it("expected returns passed expected", function() {
|
53
|
-
var result =
|
53
|
+
var result = jasmineUnderTest.buildExpectationResult({expected: 'some-value'});
|
54
54
|
expect(result.expected).toBe('some-value');
|
55
55
|
});
|
56
56
|
|
57
57
|
it("actual returns passed actual", function() {
|
58
|
-
var result =
|
58
|
+
var result = jasmineUnderTest.buildExpectationResult({actual: 'some-value'});
|
59
59
|
expect(result.actual).toBe('some-value');
|
60
60
|
});
|
61
61
|
});
|
@@ -6,7 +6,7 @@ describe("Expectation", function() {
|
|
6
6
|
},
|
7
7
|
expectation;
|
8
8
|
|
9
|
-
expectation = new
|
9
|
+
expectation = new jasmineUnderTest.Expectation({
|
10
10
|
customMatchers: matchers
|
11
11
|
});
|
12
12
|
|
@@ -20,18 +20,18 @@ describe("Expectation", function() {
|
|
20
20
|
},
|
21
21
|
expectation;
|
22
22
|
|
23
|
-
|
23
|
+
jasmineUnderTest.Expectation.addCoreMatchers(coreMatchers);
|
24
24
|
|
25
|
-
expectation = new
|
25
|
+
expectation = new jasmineUnderTest.Expectation({});
|
26
26
|
|
27
27
|
expect(expectation.toQuux).toBeDefined();
|
28
28
|
});
|
29
29
|
|
30
30
|
it("Factory builds an expectation/negative expectation", function() {
|
31
|
-
var builtExpectation =
|
31
|
+
var builtExpectation = jasmineUnderTest.Expectation.Factory();
|
32
32
|
|
33
|
-
expect(builtExpectation instanceof
|
34
|
-
expect(builtExpectation.not instanceof
|
33
|
+
expect(builtExpectation instanceof jasmineUnderTest.Expectation).toBe(true);
|
34
|
+
expect(builtExpectation.not instanceof jasmineUnderTest.Expectation).toBe(true);
|
35
35
|
expect(builtExpectation.not.isNot).toBe(true);
|
36
36
|
});
|
37
37
|
|
@@ -46,7 +46,7 @@ describe("Expectation", function() {
|
|
46
46
|
addExpectationResult = jasmine.createSpy("addExpectationResult"),
|
47
47
|
expectation;
|
48
48
|
|
49
|
-
expectation = new
|
49
|
+
expectation = new jasmineUnderTest.Expectation({
|
50
50
|
util: util,
|
51
51
|
customMatchers: matchers,
|
52
52
|
customEqualityTesters: customEqualityTesters,
|
@@ -74,7 +74,7 @@ describe("Expectation", function() {
|
|
74
74
|
addExpectationResult = jasmine.createSpy("addExpectationResult"),
|
75
75
|
expectation;
|
76
76
|
|
77
|
-
expectation = new
|
77
|
+
expectation = new jasmineUnderTest.Expectation({
|
78
78
|
util: util,
|
79
79
|
customMatchers: matchers,
|
80
80
|
actual: "an actual",
|
@@ -100,7 +100,7 @@ describe("Expectation", function() {
|
|
100
100
|
addExpectationResult = jasmine.createSpy("addExpectationResult"),
|
101
101
|
expectation;
|
102
102
|
|
103
|
-
expectation = new
|
103
|
+
expectation = new jasmineUnderTest.Expectation({
|
104
104
|
customMatchers: matchers,
|
105
105
|
util: util,
|
106
106
|
actual: "an actual",
|
@@ -132,7 +132,7 @@ describe("Expectation", function() {
|
|
132
132
|
addExpectationResult = jasmine.createSpy("addExpectationResult"),
|
133
133
|
expectation;
|
134
134
|
|
135
|
-
expectation = new
|
135
|
+
expectation = new jasmineUnderTest.Expectation({
|
136
136
|
customMatchers: matchers,
|
137
137
|
util: util,
|
138
138
|
actual: "an actual",
|
@@ -166,7 +166,7 @@ describe("Expectation", function() {
|
|
166
166
|
addExpectationResult = jasmine.createSpy("addExpectationResult"),
|
167
167
|
expectation;
|
168
168
|
|
169
|
-
expectation = new
|
169
|
+
expectation = new jasmineUnderTest.Expectation({
|
170
170
|
actual: "an actual",
|
171
171
|
customMatchers: matchers,
|
172
172
|
addExpectationResult: addExpectationResult
|
@@ -199,7 +199,7 @@ describe("Expectation", function() {
|
|
199
199
|
addExpectationResult = jasmine.createSpy("addExpectationResult"),
|
200
200
|
expectation;
|
201
201
|
|
202
|
-
expectation = new
|
202
|
+
expectation = new jasmineUnderTest.Expectation({
|
203
203
|
customMatchers: matchers,
|
204
204
|
actual: "an actual",
|
205
205
|
addExpectationResult: addExpectationResult
|
@@ -231,7 +231,7 @@ describe("Expectation", function() {
|
|
231
231
|
actual = "an actual",
|
232
232
|
expectation;
|
233
233
|
|
234
|
-
expectation = new
|
234
|
+
expectation = new jasmineUnderTest.Expectation({
|
235
235
|
customMatchers: matchers,
|
236
236
|
actual: "an actual",
|
237
237
|
addExpectationResult: addExpectationResult,
|
@@ -264,7 +264,7 @@ describe("Expectation", function() {
|
|
264
264
|
actual = "an actual",
|
265
265
|
expectation;
|
266
266
|
|
267
|
-
expectation = new
|
267
|
+
expectation = new jasmineUnderTest.Expectation({
|
268
268
|
customMatchers: matchers,
|
269
269
|
actual: "an actual",
|
270
270
|
util: util,
|
@@ -300,7 +300,7 @@ describe("Expectation", function() {
|
|
300
300
|
actual = "an actual",
|
301
301
|
expectation;
|
302
302
|
|
303
|
-
expectation = new
|
303
|
+
expectation = new jasmineUnderTest.Expectation({
|
304
304
|
customMatchers: matchers,
|
305
305
|
actual: "an actual",
|
306
306
|
addExpectationResult: addExpectationResult,
|
@@ -331,7 +331,7 @@ describe("Expectation", function() {
|
|
331
331
|
actual = "an actual",
|
332
332
|
expectation;
|
333
333
|
|
334
|
-
expectation = new
|
334
|
+
expectation = new jasmineUnderTest.Expectation({
|
335
335
|
customMatchers: matchers,
|
336
336
|
actual: "an actual",
|
337
337
|
addExpectationResult: addExpectationResult,
|
@@ -367,7 +367,7 @@ describe("Expectation", function() {
|
|
367
367
|
actual = "an actual",
|
368
368
|
expectation;
|
369
369
|
|
370
|
-
expectation = new
|
370
|
+
expectation = new jasmineUnderTest.Expectation({
|
371
371
|
customMatchers: matchers,
|
372
372
|
actual: "an actual",
|
373
373
|
addExpectationResult: addExpectationResult,
|
@@ -5,7 +5,7 @@ xdescribe('JsApiReporter (integration specs)', function() {
|
|
5
5
|
var suite, nestedSuite, nestedSpec;
|
6
6
|
|
7
7
|
beforeEach(function() {
|
8
|
-
env = new
|
8
|
+
env = new jasmineUnderTest.Env();
|
9
9
|
|
10
10
|
suite = env.describe("top-level suite", function() {
|
11
11
|
spec1 = env.it("spec 1", function() {
|
@@ -25,7 +25,7 @@ xdescribe('JsApiReporter (integration specs)', function() {
|
|
25
25
|
|
26
26
|
});
|
27
27
|
|
28
|
-
reporter = new
|
28
|
+
reporter = new jasmineUnderTest.JsApiReporter({});
|
29
29
|
env.addReporter(reporter);
|
30
30
|
|
31
31
|
env.execute();
|
@@ -82,7 +82,7 @@ xdescribe('JsApiReporter (integration specs)', function() {
|
|
82
82
|
describe("JsApiReporter", function() {
|
83
83
|
|
84
84
|
it("knows when a full environment is started", function() {
|
85
|
-
var reporter = new
|
85
|
+
var reporter = new jasmineUnderTest.JsApiReporter({});
|
86
86
|
|
87
87
|
expect(reporter.started).toBe(false);
|
88
88
|
expect(reporter.finished).toBe(false);
|
@@ -94,7 +94,7 @@ describe("JsApiReporter", function() {
|
|
94
94
|
});
|
95
95
|
|
96
96
|
it("knows when a full environment is done", function() {
|
97
|
-
var reporter = new
|
97
|
+
var reporter = new jasmineUnderTest.JsApiReporter({});
|
98
98
|
|
99
99
|
expect(reporter.started).toBe(false);
|
100
100
|
expect(reporter.finished).toBe(false);
|
@@ -106,13 +106,13 @@ describe("JsApiReporter", function() {
|
|
106
106
|
});
|
107
107
|
|
108
108
|
it("defaults to 'loaded' status", function() {
|
109
|
-
var reporter = new
|
109
|
+
var reporter = new jasmineUnderTest.JsApiReporter({});
|
110
110
|
|
111
111
|
expect(reporter.status()).toEqual('loaded');
|
112
112
|
});
|
113
113
|
|
114
114
|
it("reports 'started' when Jasmine has started", function() {
|
115
|
-
var reporter = new
|
115
|
+
var reporter = new jasmineUnderTest.JsApiReporter({});
|
116
116
|
|
117
117
|
reporter.jasmineStarted();
|
118
118
|
|
@@ -120,7 +120,7 @@ describe("JsApiReporter", function() {
|
|
120
120
|
});
|
121
121
|
|
122
122
|
it("reports 'done' when Jasmine is done", function() {
|
123
|
-
var reporter = new
|
123
|
+
var reporter = new jasmineUnderTest.JsApiReporter({});
|
124
124
|
|
125
125
|
reporter.jasmineDone({});
|
126
126
|
|
@@ -128,7 +128,7 @@ describe("JsApiReporter", function() {
|
|
128
128
|
});
|
129
129
|
|
130
130
|
it("tracks a suite", function() {
|
131
|
-
var reporter = new
|
131
|
+
var reporter = new jasmineUnderTest.JsApiReporter({});
|
132
132
|
|
133
133
|
reporter.suiteStarted({
|
134
134
|
id: 123,
|
@@ -151,7 +151,7 @@ describe("JsApiReporter", function() {
|
|
151
151
|
describe("#specResults", function() {
|
152
152
|
var reporter, specResult1, specResult2;
|
153
153
|
beforeEach(function() {
|
154
|
-
reporter = new
|
154
|
+
reporter = new jasmineUnderTest.JsApiReporter({});
|
155
155
|
specResult1 = {
|
156
156
|
id: 1,
|
157
157
|
description: "A spec"
|
@@ -181,7 +181,7 @@ describe("JsApiReporter", function() {
|
|
181
181
|
describe("#suiteResults", function(){
|
182
182
|
var reporter, suiteResult1, suiteResult2;
|
183
183
|
beforeEach(function() {
|
184
|
-
reporter = new
|
184
|
+
reporter = new jasmineUnderTest.JsApiReporter({});
|
185
185
|
suiteStarted1 = {
|
186
186
|
id: 1
|
187
187
|
};
|
@@ -218,7 +218,7 @@ describe("JsApiReporter", function() {
|
|
218
218
|
describe("#executionTime", function() {
|
219
219
|
it("should start the timer when jasmine starts", function() {
|
220
220
|
var timerSpy = jasmine.createSpyObj('timer', ['start', 'elapsed']),
|
221
|
-
reporter = new
|
221
|
+
reporter = new jasmineUnderTest.JsApiReporter({
|
222
222
|
timer: timerSpy
|
223
223
|
});
|
224
224
|
|
@@ -228,7 +228,7 @@ describe("JsApiReporter", function() {
|
|
228
228
|
|
229
229
|
it("should return the time it took the specs to run, in ms", function() {
|
230
230
|
var timerSpy = jasmine.createSpyObj('timer', ['start', 'elapsed']),
|
231
|
-
reporter = new
|
231
|
+
reporter = new jasmineUnderTest.JsApiReporter({
|
232
232
|
timer: timerSpy
|
233
233
|
});
|
234
234
|
|
@@ -240,7 +240,7 @@ describe("JsApiReporter", function() {
|
|
240
240
|
describe("when the specs haven't finished being run", function() {
|
241
241
|
it("should return undefined", function() {
|
242
242
|
var timerSpy = jasmine.createSpyObj('timer', ['start', 'elapsed']),
|
243
|
-
reporter = new
|
243
|
+
reporter = new jasmineUnderTest.JsApiReporter({
|
244
244
|
timer: timerSpy
|
245
245
|
});
|
246
246
|
|
@@ -251,7 +251,7 @@ describe("JsApiReporter", function() {
|
|
251
251
|
|
252
252
|
describe('#runDetails', function() {
|
253
253
|
it('should have details about the run', function() {
|
254
|
-
var reporter = new
|
254
|
+
var reporter = new jasmineUnderTest.JsApiReporter({});
|
255
255
|
reporter.jasmineDone({some: {run: 'details'}});
|
256
256
|
expect(reporter.runDetails).toEqual({some: {run: 'details'}});
|
257
257
|
});
|