Guest User

Untitled

a guest
Jul 15th, 2012
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. I want to return a function and have it evaluated in the calling module
  2. define(function() {
  3. var stage = {
  4. before: {
  5. createCanvas: function() {
  6. return function() {
  7. before(function(done) {
  8. this.canvas = new dropchart.Canvas({
  9. canvas: argsFor.canvas(),
  10. data: argsFor.data()
  11. });
  12. done();
  13. });
  14. };
  15. }
  16. }
  17. };
  18. return stage;
  19. });
  20.  
  21. define(['jquery', 'dropchart', 'argsFor', 'stage'],
  22. function($, dropchart, argsFor, stage) {
  23.  
  24. var should = chai.should();
  25. var xAxisSpec = {
  26.  
  27. run: function() {
  28.  
  29. describe('xAxis', function() {
  30.  
  31. stage.before.createCanvas();
  32.  
  33. ...
Advertisement
Add Comment
Please, Sign In to add comment