+/**
+ * Test that drawCallback is called with the correct value for `this`.
+ */
+it('should set this in drawCallback', function() {
+ var g = new Dygraph('graph', data, {
+ drawCallback: function(g, is_initial) {
+ assert.isTrue(is_initial);
+ assert.equal(g, this);
+ }
+ });
+});
+