Skip to content

Commit fe95723

Browse files
committed
build(deps): npm
1 parent fc4dcce commit fe95723

File tree

5 files changed

+228
-250
lines changed

5 files changed

+228
-250
lines changed

tobago-example/tobago-example-demo/package-lock.json

Lines changed: 20 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tobago-example/tobago-example-demo/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737
},
3838
"dependencies": {
3939
"font-awesome": "4.7.0",
40-
"jasmine-core": "5.12.1"
40+
"jasmine-core": "5.13.0"
4141
},
4242
"devDependencies": {
43-
"@playwright/test": "^1.56.1",
43+
"@playwright/test": "^1.57.0",
4444
"@rollup/plugin-node-resolve": "^16.0.3",
4545
"@rollup/plugin-replace": "^6.0.3",
4646
"@types/node": "^24.10.1",
@@ -50,7 +50,7 @@
5050
"npm-run-all": "^4.1.5",
5151
"postcss-cli": "^11.0.1",
5252
"rollup": "^4.53.3",
53-
"sass": "^1.94.1",
53+
"sass": "^1.94.2",
5454
"tslint": "^6.1.3",
5555
"typescript": "^5.9.3"
5656
}

tobago-example/tobago-example-demo/src/main/webapp/js/jasmine.js

Lines changed: 131 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ var getJasmineRequireObj = (function(jasmineGlobal) {
5959
j$.util = jRequire.util(j$);
6060
j$.errors = jRequire.errors();
6161
j$.formatErrorMsg = jRequire.formatErrorMsg();
62+
j$.AllOf = jRequire.AllOf(j$);
6263
j$.Any = jRequire.Any(j$);
6364
j$.Anything = jRequire.Anything(j$);
6465
j$.CallTracker = jRequire.CallTracker(j$);
@@ -416,6 +417,19 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
416417
);
417418
};
418419

420+
/**
421+
* Get an {@link AsymmetricEqualityTester} that will succeed if the actual
422+
* value being compared matches every provided equality tester.
423+
* @name asymmetricEqualityTesters.allOf
424+
* @emittedName jasmine.allOf
425+
* @since 5.13.0
426+
* @function
427+
* @param {...*} arguments - The asymmetric equality checkers to compare.
428+
*/
429+
j$.allOf = function() {
430+
return new j$.AllOf(...arguments);
431+
};
432+
419433
/**
420434
* Get an {@link AsymmetricEqualityTester} that will succeed if the actual
421435
* value being compared is an instance of the specified class/constructor.
@@ -872,12 +886,11 @@ getJasmineRequireObj().Spec = function(j$) {
872886
* @property {String} description - The description passed to the {@link it} that created this spec.
873887
* @property {String} fullName - The full description including all ancestors of this spec.
874888
* @property {String|null} parentSuiteId - The ID of the suite containing this spec, or null if this spec is not in a describe().
875-
* @property {String} filename - Deprecated. The name of the file the spec was defined in.
889+
* @property {String} filename - The name of the file the spec was defined in.
876890
* Note: The value may be incorrect if zone.js is installed or
877891
* `it`/`fit`/`xit` have been replaced with versions that don't maintain the
878-
* same call stack height as the originals. This property may be removed in
879-
* a future version unless there is enough user interest in keeping it.
880-
* See {@link https://github.com/jasmine/jasmine/issues/2065}.
892+
* same call stack height as the originals. You can fix that by setting
893+
* {@link Configuration#extraItStackFrames}.
881894
* @property {ExpectationResult[]} failedExpectations - The list of expectations that failed during execution of this spec.
882895
* @property {ExpectationResult[]} passedExpectations - The list of expectations that passed during execution of this spec.
883896
* @property {ExpectationResult[]} deprecationWarnings - The list of deprecation warnings that occurred during execution this spec.
@@ -1051,7 +1064,20 @@ getJasmineRequireObj().Spec = function(j$) {
10511064
* @returns {Array.<string>}
10521065
* @since 5.7.0
10531066
*/
1054-
getPath: this.getPath.bind(this)
1067+
getPath: this.getPath.bind(this),
1068+
1069+
/**
1070+
* The name of the file the spec was defined in.
1071+
* Note: The value may be incorrect if zone.js is installed or
1072+
* `it`/`fit`/`xit` have been replaced with versions that don't maintain the
1073+
* same call stack height as the originals. You can fix that by setting
1074+
* {@link Configuration#extraItStackFrames}.
1075+
* @name Spec#filename
1076+
* @readonly
1077+
* @type {string}
1078+
* @since 5.13.0
1079+
*/
1080+
filename: this.filename
10551081
};
10561082
}
10571083

@@ -1126,6 +1152,8 @@ getJasmineRequireObj().Order = function() {
11261152
};
11271153

11281154
getJasmineRequireObj().Env = function(j$) {
1155+
const DEFAULT_IT_DESCRIBE_STACK_DEPTH = 3;
1156+
11291157
/**
11301158
* @class Env
11311159
* @since 2.0.0
@@ -1720,45 +1748,53 @@ getJasmineRequireObj().Env = function(j$) {
17201748

17211749
this.describe = function(description, definitionFn) {
17221750
ensureIsNotNested('describe');
1723-
const filename = callerCallerFilename();
1751+
const filename = indirectCallerFilename(describeStackDepth());
17241752
return suiteBuilder.describe(description, definitionFn, filename)
17251753
.metadata;
17261754
};
17271755

17281756
this.xdescribe = function(description, definitionFn) {
17291757
ensureIsNotNested('xdescribe');
1730-
const filename = callerCallerFilename();
1758+
const filename = indirectCallerFilename(describeStackDepth());
17311759
return suiteBuilder.xdescribe(description, definitionFn, filename)
17321760
.metadata;
17331761
};
17341762

17351763
this.fdescribe = function(description, definitionFn) {
17361764
ensureIsNotNested('fdescribe');
17371765
ensureNonParallel('fdescribe');
1738-
const filename = callerCallerFilename();
1766+
const filename = indirectCallerFilename(describeStackDepth());
17391767
return suiteBuilder.fdescribe(description, definitionFn, filename)
17401768
.metadata;
17411769
};
17421770

17431771
this.it = function(description, fn, timeout) {
17441772
ensureIsNotNested('it');
1745-
const filename = callerCallerFilename();
1773+
const filename = indirectCallerFilename(itStackDepth());
17461774
return suiteBuilder.it(description, fn, timeout, filename).metadata;
17471775
};
17481776

17491777
this.xit = function(description, fn, timeout) {
17501778
ensureIsNotNested('xit');
1751-
const filename = callerCallerFilename();
1779+
const filename = indirectCallerFilename(itStackDepth());
17521780
return suiteBuilder.xit(description, fn, timeout, filename).metadata;
17531781
};
17541782

17551783
this.fit = function(description, fn, timeout) {
17561784
ensureIsNotNested('fit');
17571785
ensureNonParallel('fit');
1758-
const filename = callerCallerFilename();
1786+
const filename = indirectCallerFilename(itStackDepth());
17591787
return suiteBuilder.fit(description, fn, timeout, filename).metadata;
17601788
};
17611789

1790+
function itStackDepth() {
1791+
return DEFAULT_IT_DESCRIBE_STACK_DEPTH + config.extraItStackFrames;
1792+
}
1793+
1794+
function describeStackDepth() {
1795+
return DEFAULT_IT_DESCRIBE_STACK_DEPTH + config.extraDescribeStackFrames;
1796+
}
1797+
17621798
/**
17631799
* Get a user-defined property as part of the properties field of {@link SpecResult}
17641800
* @name Env#getSpecProperty
@@ -1944,11 +1980,12 @@ getJasmineRequireObj().Env = function(j$) {
19441980
};
19451981
}
19461982

1947-
function callerCallerFilename() {
1983+
function indirectCallerFilename(depth) {
19481984
const frames = new j$.StackTrace(new Error()).frames;
1949-
// frames[3] should always exist except in Jasmine's own tests, which bypass
1950-
// the global it/describe layer, but don't crash if it doesn't.
1951-
return frames[3] && frames[3].file;
1985+
// The specified frame should always exist except in Jasmine's own tests,
1986+
// which bypass the global it/describe layer, but could be absent in case
1987+
// of misconfiguration. Don't crash if it's absent.
1988+
return frames[depth] && frames[depth].file;
19521989
}
19531990

19541991
return Env;
@@ -2084,6 +2121,34 @@ getJasmineRequireObj().JsApiReporter = function(j$) {
20842121
return JsApiReporter;
20852122
};
20862123

2124+
getJasmineRequireObj().AllOf = function(j$) {
2125+
function AllOf() {
2126+
const expectedValues = Array.from(arguments);
2127+
if (expectedValues.length === 0) {
2128+
throw new TypeError(
2129+
'jasmine.allOf() expects at least one argument to be passed.'
2130+
);
2131+
}
2132+
this.expectedValues = expectedValues;
2133+
}
2134+
2135+
AllOf.prototype.asymmetricMatch = function(other, matchersUtil) {
2136+
for (const expectedValue of this.expectedValues) {
2137+
if (!matchersUtil.equals(other, expectedValue)) {
2138+
return false;
2139+
}
2140+
}
2141+
2142+
return true;
2143+
};
2144+
2145+
AllOf.prototype.jasmineToString = function(pp) {
2146+
return '<jasmine.allOf(' + pp(this.expectedValues) + ')>';
2147+
};
2148+
2149+
return AllOf;
2150+
};
2151+
20872152
getJasmineRequireObj().Any = function(j$) {
20882153
function Any(expectedObject) {
20892154
if (typeof expectedObject === 'undefined') {
@@ -3389,7 +3454,30 @@ getJasmineRequireObj().Configuration = function(j$) {
33893454
* @type Boolean
33903455
* @default false
33913456
*/
3392-
detectLateRejectionHandling: false
3457+
detectLateRejectionHandling: false,
3458+
3459+
/**
3460+
* The number of extra stack frames inserted by a wrapper around {@link it}
3461+
* or by some other local modification. Jasmine uses this to determine the
3462+
* filename for {@link SpecStartedEvent} and {@link SpecDoneEvent}.
3463+
* @name Configuration#extraItStackFrames
3464+
* @since 5.13.0
3465+
* @type number
3466+
* @default 0
3467+
*/
3468+
extraItStackFrames: 0,
3469+
3470+
/**
3471+
* The number of extra stack frames inserted by a wrapper around
3472+
* {@link describe} or by some other local modification. Jasmine uses this
3473+
* to determine the filename for {@link SpecStartedEvent} and
3474+
* {@link SpecDoneEvent}.
3475+
* @name Configuration#extraDescribeStackFrames
3476+
* @since 5.13.0
3477+
* @type number
3478+
* @default 0
3479+
*/
3480+
extraDescribeStackFrames: 0
33933481
};
33943482
Object.freeze(defaultConfig);
33953483

@@ -3445,6 +3533,16 @@ getJasmineRequireObj().Configuration = function(j$) {
34453533
if (changes.hasOwnProperty('verboseDeprecations')) {
34463534
this.#values.verboseDeprecations = changes.verboseDeprecations;
34473535
}
3536+
3537+
// 0 is a valid value for both of these, so a truthiness check wouldn't work
3538+
if (typeof changes.extraItStackFrames !== 'undefined') {
3539+
this.#values.extraItStackFrames = changes.extraItStackFrames;
3540+
}
3541+
3542+
if (typeof changes.extraDescribeStackFrames !== 'undefined') {
3543+
this.#values.extraDescribeStackFrames =
3544+
changes.extraDescribeStackFrames;
3545+
}
34483546
}
34493547
}
34503548

@@ -10621,12 +10719,11 @@ getJasmineRequireObj().Suite = function(j$) {
1062110719
* @property {String} description - The description text passed to the {@link describe} that made this suite.
1062210720
* @property {String} fullName - The full description including all ancestors of this suite.
1062310721
* @property {String|null} parentSuiteId - The ID of the suite containing this suite, or null if this is not in another describe().
10624-
* @property {String} filename - Deprecated. The name of the file the suite was defined in.
10722+
* @property {String} filename - The name of the file the suite was defined in.
1062510723
* Note: The value may be incorrect if zone.js is installed or
1062610724
* `describe`/`fdescribe`/`xdescribe` have been replaced with versions that
10627-
* don't maintain the same call stack height as the originals. This property
10628-
* may be removed in a future version unless there is enough user interest
10629-
* in keeping it. See {@link https://github.com/jasmine/jasmine/issues/2065}.
10725+
* don't maintain the same call stack height as the originals. You can fix
10726+
* that by setting {@link Configuration#extraDescribeStackFrames}.
1063010727
* @property {ExpectationResult[]} failedExpectations - The list of expectations that failed in an {@link afterAll} for this suite.
1063110728
* @property {ExpectationResult[]} deprecationWarnings - The list of deprecation warnings that occurred on this suite.
1063210729
* @property {String} status - Once the suite has completed, this string represents the pass/fail status of this suite.
@@ -10833,6 +10930,19 @@ getJasmineRequireObj().Suite = function(j$) {
1083310930
* @since 2.0.0
1083410931
*/
1083510932
this.description = suite.description;
10933+
10934+
/**
10935+
* The name of the file the suite was defined in.
10936+
* Note: The value may be incorrect if zone.js is installed or
10937+
* `describe`/`fdescribe`/`xdescribe` have been replaced with versions
10938+
* that don't maintain the same call stack height as the originals. You
10939+
* can fix that by setting {@link Configuration#extraItStackFrames}.
10940+
* @name Suite#filename
10941+
* @readonly
10942+
* @type {string}
10943+
* @since 5.13.0
10944+
*/
10945+
this.filename = suite.filename;
1083610946
}
1083710947

1083810948
/**
@@ -11791,5 +11901,5 @@ getJasmineRequireObj().UserContext = function(j$) {
1179111901
};
1179211902

1179311903
getJasmineRequireObj().version = function() {
11794-
return '5.12.1';
11904+
return '5.13.0';
1179511905
};

0 commit comments

Comments
 (0)