UNPKG

siesta-lite

Version:

Stress-free JavaScript unit testing and functional testing tool, works in NodeJS and browsers

30 lines (24 loc) 924 B
StartTest(function (t) { if (!('onunhandledrejection' in window)) return t.it('Should fail on unhandled rejection', function (t) { t.getHarness( { viewDOM : false }, [ 'testfiles/631_fail_for_promise_rejection.t.js' ] ); t.chain( { waitFor : 'rowsVisible', args : 'testgrid' }, function(next) { var store = t.cq1('testgrid').store; var testRecord = store.getNodeById('testfiles/631_fail_for_promise_rejection.t.js'); t.waitForHarnessEvent('testsuiteend', function() { t.ok(testRecord.get('test').isFailed(), 'Should find failed tests if there is a missing preload'); }); Harness.launch([ testRecord.get('descriptor') ]); } ); }) })