jasmine-headless-webkit/spec/javascripts/jasmine.headless-reporter_spec.coffee

17 lines
535 B
CoffeeScript
Raw Normal View History

2011-07-14 14:54:44 +00:00
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)