bahmutov / snap-shot

Jest-like snapshot feature for the rest of us, works magically by finding the right caller function
169 stars 3 forks source link

Does not have right stack in promises #21

Open bahmutov opened 7 years ago

bahmutov commented 7 years ago

There is a difference between callsites, stack exception and console.trace

// stack-site
[ { functionName: 'stackSites',
    filename: '/node_modules/stack-sites/src/index.js',
    line: 45,
    column: 13 },
  { functionName: 'snapshot',
    filename: '/node_modules/snap-shot/src/index.js',
    line: 157,
    column: 17 } ]
// console.trace
Trace
    at snapshot (/node_modules/snap-shot/src/index.js:166:13)
    at /test/fundamentals-api-spec.js:24:9
    at process._tickCallback (internal/process/next_tick.js:103:7)
// callsites
/node_modules/snap-shot/src/index.js 168 19
/test/fundamentals-api-spec.js 24 9
internal/process/next_tick.js 103 7