Skip to content

Instantly share code, notes, and snippets.

@magnars
Created June 19, 2013 10:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save magnars/5813202 to your computer and use it in GitHub Desktop.
Save magnars/5813202 to your computer and use it in GitHub Desktop.
(function () {
buster.testCase("dom", {
"assert.called fails in IE8, this is the minimal case": function () {
var spy = this.spy();
spy(document.createElement("input"));
assert.called(spy);
}
});
}());
@cjohansen
Copy link

Try this to narrow down:

<!DOCTYPE html>
<html>
  <head>
    <title>Random</title>
  </head>
  <body>
    <script src="http://sinonjs.org/releases/sinon-1.7.1.js"></script>
    <script src="node_modules/buster/node_modules/buster-core/lib/buster-core.js"></script>
    <script src="node_modules/buster/node_modules/buster-core/lib/buster-event-emitter.js"></script>
    <script src="node_modules/buster/node_modules/buster-assertions/lib/buster-assertions.js"></script>
    <script src="node_modules/buster/node_modules/buster-sinon/lib/buster-sinon.js"></script>
    <script>
  try {
      var sandbox = sinon.sandbox.create();
      var spy = sandbox.spy();
      spy(document.createElement("input"));
      console.log(buster.assertions.assert.called(spy));
      sandbox.restore();
  } catch (e) {
      console.log(e);
  }
    </script>
  </body>
</html>

@magnars
Copy link
Author

magnars commented Jun 19, 2013

It fails on the assert.called call, and never reaches sandbox.restore();

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