#14439 closed defect (fixed)
error returning dojo.Deferred instead of doh.Deferred from DOH test
Reported by: | mm | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.8 |
Component: | TestFramework | Version: | 1.7.0 |
Keywords: | DOH, crash | Cc: | |
Blocked By: | Blocking: |
Description (last modified by )
Runner crashes and prevents other methods from executing/
Reason is line:
1328 doh._testFinished(groupName, fixture, ret.results[0]);
in runner.js and ret.results being undefined
See attached testcase and screenshot from FF+FB
Attachments (4)
Change History (11)
Changed 9 years ago by
Attachment: | SampleTest.js added |
---|
Changed 9 years ago by
Attachment: | runTests.html added |
---|
comment:1 Changed 9 years ago by
Changed 9 years ago by
Attachment: | simplifiedWorks.js added |
---|
works using doh.Deferred, run as util/doh/runner.html?testModule=test.simplifiedWorks®isterModulePath=test,/trunk/runTests.html/..
Changed 9 years ago by
Attachment: | simplified.js added |
---|
failure using dojo/_base/Deferred, run as http://localhost/trunk/util/doh/runner.html?testModule=test.simplified®isterModulePath=test,/trunk/runTests.html/..
comment:2 Changed 9 years ago by
Component: | General → TestFramework |
---|---|
Description: | modified (diff) |
Milestone: | → 1.8 |
Owner: | set to bill |
Priority: | high → normal |
severity: | major → minor |
Summary: | DOH runner.js and deferred test → error returning dojo.Deferred instead of doh.Deferred from DOH test |
In the past you needed to return doh.Deferred(). In 1.7 (and 1.6.1 and 1.5.2) you should be able to return dojo.Deferred(), see #12463. However, looks like you found a bug with that. The workaround is to keep using doh.Deferred.
As you mentioned, the documentation is inaccurate in that doh.Deferred still has the old names for methods: callback() and errback(), rather than resolve() and reject(). I'll update that.
comment:4 Changed 9 years ago by
Updated http://livedocs.dojotoolkit.org/util/doh to not mention resolve() or reject() in https://github.com/dojo/docs/commit/653ce4a1de48dce045385aacb602558c2061b3a5
comment:6 Changed 9 years ago by
does it mean we shall try to use Deferred again instead of doh.Deffered for asnyc test results ?
comment:7 Changed 9 years ago by
Well, you can use a dojo.Deferred if it's more convenient. Most of the time doh.Deferred makes sense because it has convenient getTestCallback() and getTestErrback() methods.
one quick comment: shall we use doh.Deferred or Deferred ?
sample http://livedocs.dojotoolkit.org/util/doh#simple-tests-no-setup-standalone-asynchronous-test states doh.Deferred, however it has no deferred.reject method as specified in the sample