#18880 closed defect (fixed)
doh: async test and a throw in teardown makes doh crash
Reported by: | tupton | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | 1.8.13 |
Component: | TestFramework | Version: | 1.11.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
If you have an async test in doh – that is, if you return a doh.Deferred
in runTest
– and you throw in your tearDown
, that causes doh to crash. I believe this is a simple context issue here: https://github.com/dojo/util/blob/1.11.2/doh/runner.js#L1396. this.debug
should be doh.debug
.
This is possibly a bad copy paste from https://github.com/dojo/util/blob/1.11.2/doh/runner.js#L1471-L1480 but I'm not entirely sure.
I have a codepen that reproduces the issue here: http://codepen.io/tupton/pen/akrpwd?editors=0011
I know doh is pretty much deprecated in favor of intern and other alternatives, but we still use doh and it'd be awesome to fix this if it truly is that simple.
Change History (7)
comment:1 Changed 4 years ago by
Milestone: | tbd → 1.11.3 |
---|---|
Priority: | undecided → high |
comment:2 Changed 4 years ago by
Owner: | set to Michael Van Sickle <[email protected]…> |
---|---|
Resolution: | → fixed |
Status: | new → closed |
In 5f4e4ef/util:
comment:7 Changed 4 years ago by
Milestone: | 1.11.3 → 1.8.13 |
---|
Thanks. Yes, that does look like the reason for this bug. We will land a fix for 1.11.3 and backport to earlier releases as needed. If you have time/interest in submitting a PR per the guidelines at https://github.com/dojo/dojo/blob/master/CONTRIBUTING.md , even better!