Opened 13 years ago
Closed 13 years ago
#7144 closed defect (fixed)
doh still has dojo dependencies
Reported by: | haysmark | Owned by: | alex |
---|---|---|---|
Priority: | high | Milestone: | 1.2 |
Component: | TestFramework | Version: | 1.1.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Array-based tests work fine without Dojo:
<html> <head> <script src="runner.js"></script> <script> doh.register("dojoless", [ function runTest(){ alert("ran"); } ]); doh.run(); </script> </head> <body> </body> </html>
But now try the setUp/runTest/tearDown model:
<html> <head> <script src="runner.js"></script> <script> doh.register("dojoless", { runTest:function(){ alert("ran"); } }); doh.run(); </script> </head> <body> </body> </html>
You get the error, "dojo is not defined" at this line:
doh._isArray = function(it){ return (it && it instanceof Array || typeof it == "array" || (dojo["NodeList"] !== undefined && it instanceof dojo.NodeList)); }
The test is not an array so the return falls into the dojo.NodeList? code. But dojo is not available! It should check for dojo like it does for NodeList?.
Note: See
TracTickets for help on using
tickets.
(In [14416]) fixing burried dojo dependency in runner.js. Fixes #7144. !strict