jasmine-headless-webkit/spec/javascripts/jasmine.headless-reporter_spec.coffee
2011-07-14 10:54:44 -04:00

17 lines
535 B
CoffeeScript

describe 'HeadlessReporterResult', ->
beforeEach ->
HeadlessReporterResult.specLineNumbers = {
'one': {
'name': [ 1 ],
'of': [ 2, 9 ],
'test': [ 3, 10 ],
'other': [ 7 ]
}
}
it 'should find the best spec lines', ->
result = new HeadlessReporterResult('test', [ 'name', 'of', 'test' ])
expect(result._findSpecLine().lineNumber).toEqual(3)
result = new HeadlessReporterResult('test', [ 'other', 'of', 'test' ])
expect(result._findSpecLine().lineNumber).toEqual(10)