Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests with uncaught exceptions disappear #13

Open
brcsw opened this issue Nov 14, 2021 · 2 comments
Open

Tests with uncaught exceptions disappear #13

brcsw opened this issue Nov 14, 2021 · 2 comments

Comments

@brcsw
Copy link

brcsw commented Nov 14, 2021

Repro: Run a test that throws an uncaught exception, for example:

var QUnit = QUnitGS2.QUnit;

function doGet() {
   QUnitGS2.init();

   // Just to demonstrate that QUnitGS2 plumbing is hooked up correctly.
   QUnit.test("simple numbers", function( assert ) {
     assert.equal(1 + 1, 2, "addition");
   });

   QUnit.test("exception", function( assert ) {
     Logger.log("before exception");
     throw "uh oh";
     Logger.log("after exception");
   });

   QUnit.start();
   return QUnitGS2.getHtml();
}

function getResultsFromServer() {
   return QUnitGS2.getResultsFromServer();
}

I'm using the V8 runtime; not sure if that matters.

Expected: something shows up in the results page, or at least in the log that indicates an exception was thrown.

Actual: no indication in the UI that the test was even defined:

html screenshot

logs screenshot

@tomhallman
Copy link

Just ran into the same problem. It took me a while to realize I'd made an error in my "before" test setup.

@tomhallman
Copy link

Worked on (around) this for a few hours, and basically any assert.throws() call needs a try/catch else the other tests aren't run.

Not sure if this is related, but the test suite page points to the live test results, which fails at line 45.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants