Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 01e0571

Browse filesBrowse files
telenordaddaleax
authored andcommitted
test: test cover cases when trace is empty
cover prepare_stack_trace in case when trace is empty PR-URL: #30311 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
1 parent 017280e commit 01e0571
Copy full SHA for 01e0571

File tree

Expand file treeCollapse file tree

2 files changed

+18
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+18
-0
lines changed
Open diff view settings
Collapse file
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
"use strict";
2+
3+
Error.stackTraceLimit = 0;
4+
throw new RangeError('emptyStackError');
5+
6+
Collapse file

‎test/parallel/test-source-map.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-source-map.js
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,18 @@ function nextdir() {
253253
}
254254
}
255255

256+
// trace.length === 0 .
257+
{
258+
const output = spawnSync(process.execPath, [
259+
'--enable-source-maps',
260+
require.resolve('../fixtures/source-map/emptyStackError.js')
261+
]);
262+
263+
assert.ok(
264+
output.stderr.toString().match('emptyStackError')
265+
);
266+
}
267+
256268
function getSourceMapFromCache(fixtureFile, coverageDirectory) {
257269
const jsonFiles = fs.readdirSync(coverageDirectory);
258270
for (const jsonFile of jsonFiles) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.