blob: fa6c2054edfa2957a3c08acf093f4388928d41f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
sinon = require 'sinon'
describe 'Epoch.Time.Line', ->
chart = null
beforeEach ->
chart = new Epoch.Time.Line
data: [{ range: 'foo', values: [{time: 0, y: 10}, {time: 1, y: 30}] }]
describe 'draw', ->
beforeEach -> sinon.spy chart, 'y'
afterEach -> chart.y.restore()
it 'should provide the layer\'s range to the y scale', ->
chart.draw()
assert.ok chart.y.calledWith('foo')
|