<commit_before>#!/usr/bin/env node

require('./proof')(3, function (Strata, step, tmp,  load, objectify, serialize, gather, deepEqual) {
    var strata = new Strata({ directory: tmp, leafSize: 3, branchSize: 3 })
    step(function () {
        serialize(__dirname + '/fixtures/split.before.json', tmp, step())
    }, function () {
        strata.open(step())
    }, function () {
        gather(step, strata)
    }, function (records) {
        deepEqual(records, [ 'a', 'c', 'd' ], 'records')
    }, function () {
        strata.mutator('a', step())
    }, function (cursor) {
        step(function () {
            cursor.indexOf('c', step())
        }, function (i) {
            cursor.remove(i, step())
        }, function () {
            cursor.unlock()
        })
    }, function () {
        gather(step, strata)
    }, function (records) {
        deepEqual(records, [ 'a', 'd' ], 'records')

        strata.purge(0)
        deepEqual(strata.size, 0, 'purged')

        strata.close(step())
    })
})
<commit_msg>Use `assert` in `t/basics/delete.t.js`.<commit_after>#!/usr/bin/env node

require('./proof')(3, function (Strata, step, tmp,  load, objectify, serialize, gather, assert) {
    var strata = new Strata({ directory: tmp, leafSize: 3, branchSize: 3 })
    step(function () {
        serialize(__dirname + '/fixtures/split.before.json', tmp, step())
    }, function () {
        strata.open(step())
    }, function () {
        gather(step, strata)
    }, function (records) {
        assert(records, [ 'a', 'c', 'd' ], 'records')
    }, function () {
        strata.mutator('a', step())
    }, function (cursor) {
        step(function () {
            cursor.indexOf('c', step())
        }, function (i) {
            cursor.remove(i, step())
        }, function () {
            cursor.unlock()
        })
    }, function () {
        gather(step, strata)
    }, function (records) {
        assert(records, [ 'a', 'd' ], 'records')

        strata.purge(0)
        assert(strata.size, 0, 'purged')

        strata.close(step())
    })
})

{'fraction_non_alphanumeric': 0.18689320388349515, 'fraction_numerical': 0.0048543689320388345, 'mean_word_length': 2.2354788069073783, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7421049', 'n_tokens_mistral': 661, 'n_tokens_neox': 644, 'n_words': 137}