UNPKG

@rxjs-stuff/marbles

Version:

A set of plugins that provide a natural feeling integration with Mocha and Chai for RxJS "marbles" testing.

14 lines 642 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.cleanStack = void 0; const STOP_STRINGS = ['rxjs-marbles/src', 'node_modules/@rxjs-marbles', 'node_modules/rxjs']; function cleanStack(stackOrFirstLine, ...lines) { lines = lines.length === 0 ? stackOrFirstLine.split('\n') : [stackOrFirstLine, ...lines]; const firstStopIndex = lines.findIndex(line => STOP_STRINGS.some(stop => line.includes(stop))); if (firstStopIndex >= 0) { return lines.slice(0, firstStopIndex).join('\n'); } return lines.join('\n'); } exports.cleanStack = cleanStack; //# sourceMappingURL=clean-stack.js.map