1// Flags: --enable-source-maps 2'use strict'; 3 4require('../common'); 5const assert = require('assert'); 6 7// Error.prepareStackTrace() can be overridden with source maps enabled. 8{ 9 let prepareCalled = false; 10 Error.prepareStackTrace = (_error, trace) => { 11 prepareCalled = true; 12 }; 13 try { 14 throw new Error('foo'); 15 } catch (err) { 16 err.stack; // eslint-disable-line no-unused-expressions 17 } 18 assert(prepareCalled); 19} 20