| 1 | if (typeof define !== 'function') { var define = (require('../../../amdefine'))(module, require); } |
| 2 | |
| 3 | //Just testing a plain exports case. |
| 4 | define(function (require) { |
| 5 | var dynamic = { |
| 6 | count: 0, |
| 7 | action: function () { |
| 8 | dynamic.count += 1; |
| 9 | |
| 10 | //Test that dynamic require is not synchronous. If it was, this |
| 11 | //would add two to the counter, instead of just one. |
| 12 | require(['../addTwo'], function (addTwo) { |
| 13 | console.log('dynamic require should fire after TEST SUMMARY is shown.'); |
| 14 | dynamic.count += addTwo(); |
| 15 | }); |
| 16 | } |
| 17 | }; |
| 18 | |
| 19 | return dynamic; |
| 20 | }); |