This repository has been archived by the owner. It is now read-only.

assert.exception() failure gets max call stack for nested test objects #63

Closed
rvagg opened this Issue Jan 27, 2012 · 1 comment

Comments

Projects
None yet
2 participants
@rvagg

rvagg commented Jan 27, 2012

Perhaps related to #61, perhaps not:

buster.testCase('assert.exception() with additional level test container fails on max call stack', {
  'tests in here': {
    'assert.exception': function () {
      buster.assert.exception(function () {})
    }
  }
})

buster.testCase('assert.exception() with empty additional level test container fails on max call stack', {
  'assert.exception': function () {
    buster.assert.exception(function () {})
  },
  'nothing in here': { }
})
 $ buster-test
assert.exception() with additional level test container fails on max call stack: E
assert.exception() with empty additional level test container fails on max call stack: E
Error: assert.exception() with additional level test container fails on max call stack tests in here assert.exception
    RangeError: Maximum call stack size exceeded

Error: assert.exception() with empty additional level test container fails on max call stack assert.exception
    RangeError: Maximum call stack size exceeded

Take out the additional levels in the test object fed to testCase() and it's fine. Note that the second test simply has an empty additional level to get this failure. Providing an exception name/type argument doesn't change anything. Only a pass condition makes the problem go away so it's something to do with error message generation would be my guess.

@cjohansen

This comment has been minimized.

Member

cjohansen commented Feb 21, 2012

Fixed in buster 0.4.4

@cjohansen cjohansen closed this Feb 21, 2012

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.