StackTraceAnalyzer.spec.ts 922 B

12345678910111213141516171819
  1. import { assert } from 'chai';
  2. import { StackTraceAnalyzer } from '../../../src/stack-trace-analyzer/StackTraceAnalyzer';
  3. describe('StackTraceAnalyzer', () => {
  4. describe('getLimitIndex (blockScopeBodyLength: number): number', () => {
  5. it('should returns correct limit index based on block scope body length', () => {
  6. const blockScopeBodyLength1: number = 10000;
  7. const blockScopeBodyLength2: number = 1000;
  8. const blockScopeBodyLength3: number = 25;
  9. const blockScopeBodyLength4: number = 5;
  10. assert.equal(StackTraceAnalyzer.getLimitIndex(blockScopeBodyLength1), 44);
  11. assert.equal(StackTraceAnalyzer.getLimitIndex(blockScopeBodyLength2), 26);
  12. assert.equal(StackTraceAnalyzer.getLimitIndex(blockScopeBodyLength3), 24);
  13. assert.equal(StackTraceAnalyzer.getLimitIndex(blockScopeBodyLength4), 4);
  14. });
  15. });
  16. });