jasmine-core 2.9.0 → 2.99.2
Sign up to get free protection for your applications and to get access to all the features.
- 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,47 +0,0 @@
|
|
1
|
-
describe("DiffBuilder", function() {
|
2
|
-
it("records the actual and expected objects", function() {
|
3
|
-
var diffBuilder = jasmineUnderTest.DiffBuilder();
|
4
|
-
diffBuilder.record({x: 'actual'}, {x: 'expected'});
|
5
|
-
|
6
|
-
expect(diffBuilder.getMessage()).toEqual("Expected Object({ x: 'actual' }) to equal Object({ x: 'expected' }).");
|
7
|
-
});
|
8
|
-
|
9
|
-
it("prints the path at which the difference was found", function() {
|
10
|
-
var diffBuilder = jasmineUnderTest.DiffBuilder();
|
11
|
-
|
12
|
-
diffBuilder.withPath('foo', function() {
|
13
|
-
diffBuilder.record({x: 'actual'}, {x: 'expected'});
|
14
|
-
});
|
15
|
-
|
16
|
-
expect(diffBuilder.getMessage()).toEqual("Expected $.foo = Object({ x: 'actual' }) to equal Object({ x: 'expected' }).");
|
17
|
-
});
|
18
|
-
|
19
|
-
it("prints multiple messages, separated by newlines", function() {
|
20
|
-
var diffBuilder = jasmineUnderTest.DiffBuilder();
|
21
|
-
|
22
|
-
diffBuilder.withPath('foo', function() {
|
23
|
-
diffBuilder.record(1, 2);
|
24
|
-
});
|
25
|
-
|
26
|
-
var message =
|
27
|
-
"Expected $.foo = 1 to equal 2.\n" +
|
28
|
-
"Expected 3 to equal 4.";
|
29
|
-
|
30
|
-
diffBuilder.record(3, 4);
|
31
|
-
expect(diffBuilder.getMessage()).toEqual(message);
|
32
|
-
});
|
33
|
-
|
34
|
-
it("allows customization of the message", function() {
|
35
|
-
var diffBuilder = jasmineUnderTest.DiffBuilder();
|
36
|
-
|
37
|
-
function darthVaderFormatter(actual, expected, path) {
|
38
|
-
return "I find your lack of " + expected + " disturbing. (was " + actual + ", at " + path + ")"
|
39
|
-
}
|
40
|
-
|
41
|
-
diffBuilder.withPath('x', function() {
|
42
|
-
diffBuilder.record('bar', 'foo', darthVaderFormatter);
|
43
|
-
});
|
44
|
-
|
45
|
-
expect(diffBuilder.getMessage()).toEqual("I find your lack of foo disturbing. (was bar, at $.x)");
|
46
|
-
});
|
47
|
-
});
|
@@ -1,13 +0,0 @@
|
|
1
|
-
describe('NullDiffBuilder', function() {
|
2
|
-
it('responds to withPath() by calling the passed function', function() {
|
3
|
-
var spy = jasmine.createSpy('callback');
|
4
|
-
jasmineUnderTest.NullDiffBuilder().withPath('does not matter', spy);
|
5
|
-
expect(spy).toHaveBeenCalled();
|
6
|
-
});
|
7
|
-
|
8
|
-
it('responds to record()', function() {
|
9
|
-
expect(function() {
|
10
|
-
jasmineUnderTest.NullDiffBuilder().record('does not matter');
|
11
|
-
}).not.toThrow();
|
12
|
-
})
|
13
|
-
});
|
@@ -1,43 +0,0 @@
|
|
1
|
-
describe('ObjectPath', function() {
|
2
|
-
var ObjectPath = jasmineUnderTest.ObjectPath;
|
3
|
-
|
4
|
-
it('represents the path to a node in an object tree', function() {
|
5
|
-
expect(new ObjectPath(['foo', 'bar']).toString()).toEqual('$.foo.bar');
|
6
|
-
});
|
7
|
-
|
8
|
-
it('has a depth', function() {
|
9
|
-
expect(new ObjectPath().depth()).toEqual(0);
|
10
|
-
expect(new ObjectPath(['foo']).depth()).toEqual(1);
|
11
|
-
});
|
12
|
-
|
13
|
-
it('renders numbers as array access', function() {
|
14
|
-
expect(new ObjectPath(['foo', 0]).toString()).toEqual('$.foo[0]');
|
15
|
-
});
|
16
|
-
|
17
|
-
it('renders properties that are valid identifiers with dot notation', function() {
|
18
|
-
expect(new ObjectPath(['foo123']).toString()).toEqual('$.foo123');
|
19
|
-
expect(new ObjectPath(['x_y']).toString()).toEqual('$.x_y');
|
20
|
-
expect(new ObjectPath(['A$B']).toString()).toEqual('$.A$B');
|
21
|
-
});
|
22
|
-
|
23
|
-
it('renders properties with non-identifier-safe characters with square bracket notation', function() {
|
24
|
-
expect(new ObjectPath(['a b c']).toString()).toEqual("$['a b c']");
|
25
|
-
expect(new ObjectPath(['1hello']).toString()).toEqual("$['1hello']");
|
26
|
-
});
|
27
|
-
|
28
|
-
it('renders as the empty string when empty', function() {
|
29
|
-
expect(new ObjectPath().toString()).toEqual('');
|
30
|
-
});
|
31
|
-
|
32
|
-
it('stringifies properties that are not strings or numbers', function() {
|
33
|
-
expect(new ObjectPath([{}]).toString()).toEqual("$['[object Object]']");
|
34
|
-
});
|
35
|
-
|
36
|
-
it('can be created based on another path', function() {
|
37
|
-
var root = new ObjectPath();
|
38
|
-
var path = root.add('foo');
|
39
|
-
|
40
|
-
expect(path.toString()).toEqual('$.foo');
|
41
|
-
expect(root.toString()).toEqual('');
|
42
|
-
})
|
43
|
-
});
|