flux icon indicating copy to clipboard operation
flux copied to clipboard

Test variables missing var keyword

Open jim-y opened this issue 12 years ago • 2 comments

In TodoStore-test.js the variables at lines 37-39 are missing var, and i think they are going global

beforeEach(function() {
  AppDispatcher = require('../../dispatcher/AppDispatcher');
  TodoStore = require('../TodoStore');
  callback = AppDispatcher.register.mock.calls[0][0];
});

Not a big deal though :)

jim-y avatar Oct 12 '14 21:10 jim-y

Yeah, we should hoist the original declaration of those variables out to the closure of the describe() function. Please submit a pull request, if you want, or I can get to it when I can.

fisherwebdev avatar Oct 25 '14 21:10 fisherwebdev

Thanks for taking care of this!

fisherwebdev avatar Nov 04 '14 03:11 fisherwebdev