Skip to content

Commit f525545

Browse files
committed
ExceptionFormatterSpec: filter GJS stack frames in AggregateError test
GJS adds internal frames like 'setTimeout/source' and 'GLib.MainLoop.prototype.runAsync' to stack traces. The test 'includes all aggregated errors in the stack trace' expects exactly 10 lines after filtering, but in GJS there are extra frames that the existing filters don't catch. Add a filter for 'resource:///org/gnome/gjs/' to exclude GJS internal frames from the line count check.
1 parent 6dcc22c commit f525545

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

spec/core/ExceptionFormatterSpec.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,9 @@ describe('ExceptionFormatter', function() {
380380
x =>
381381
!x.match(/[\/\\]jasmine\.js:/) &&
382382
// Some Node 20 and 22 minors when running in parallel
383-
!x.includes('process.processTicksAndRejections')
383+
!x.includes('process.processTicksAndRejections') &&
384+
// GJS internal frames
385+
!x.includes('resource:///org/gnome/gjs/')
384386
);
385387

386388
for (let i = 0; i < filteredLines.length; i++) {

0 commit comments

Comments
 (0)