var expect = require('expect.js');

describe('cursor resolution', function () {
    var Run = require('../../lib/runner/run.js');

    it('must resolve to the item specified', function () {
        var run = new Run({
            items: [{id: 'one'}, {id: 'two'}, {id: 'three'}]
        });

        expect(run.resolveCursor({
            position: 1
        })).to.eql({
            id: 'two'
        });
    });

    it('must return undefined for an item not found', function () {
        var run = new Run({
            items: [{id: 'one'}, {id: 'two'}, {id: 'three'}]
        });

        expect(run.resolveCursor({
            position: 12
        })).to.not.be.ok();
    });

    it('must return undefined for a missing cursor', function () {
        var run = new Run({
            items: [{id: 'one'}, {id: 'two'}, {id: 'three'}]
        });

        expect(run.resolveCursor()).to.not.be.ok();
    });
});

@@ -19,19 +19,21 @@
 re('
+chai').
 expect
-.js')
 ;%0A%0Ad
@@ -134,20 +134,22 @@
     it('
-must
+should
  resolve
@@ -412,36 +412,38 @@
    %7D);%0A%0A    it('
-must
+should
  return undefine
@@ -655,35 +655,36 @@
      %7D)).to.
-not.be.ok()
+be.undefined
 ;%0A    %7D);%0A%0A 
@@ -694,12 +694,14 @@
 it('
-must
+should
  ret
@@ -896,19 +896,20 @@
 .to.
-not.be.ok()
+be.undefined
 ;%0A  

Update runner-cursor-resolve tests to chai