#!/usr/bin/env node

require('./proof')(3, function (step, Strata, tmp, deepEqual, serialize, gather, equal) {
    var strata = new Strata({ directory: tmp, leafSize: 3, branchSize: 3 }), fs = require('fs')
    step(function () {
        serialize(__dirname + '/fixtures/ambiguous.before.json', tmp, step())
    }, function () {
        strata.open(step())
    }, function () {
        gather(step, strata)
    }, function (records) {
        deepEqual(records, [ 'a', 'd', 'f', 'g', 'h', 'i', 'l', 'm', 'n' ], 'records')
    }, function () {
        strata.mutator('d', step())
    }, function (cursor) {
        step(function () {
            cursor.indexOf('e', step())
        }, function (index) {
            cursor.insert('e', 'e', ~index, step())
        }, function (unambiguous) {
            cursor.unlock()
            equal(unambiguous, 0, 'unambiguous')
        }, function () {
            gather(step, strata)
        })
    }, function (records) {
        deepEqual(records, [ 'a', 'd', 'e', 'f', 'g', 'h', 'i', 'l', 'm', 'n' ], 'records after insert')
    }, function() {
        strata.close(step())
    })
})

@@ -68,19 +68,8 @@
 tmp,
- deepEqual,
  ser
@@ -83,16 +83,27 @@
  gather,
+ deepEqual,
  equal) 
@@ -183,28 +183,8 @@
 3 %7D)
-, fs = require('fs')
 %0A   

Tidy `t/insert/ambiguous-less-than-length.t.js`.