<commit_before>var assert = require('assert')
var bitcoinjs = require('bitcoinjs-lib')

var Account = require('../src/account')
var AddressIterator = require('../src/iterator')
var discovery = require('../src/discovery')

var fixtures = require('./fixtures/discovery')

describe('Discovery', function() {
  this.timeout(10000)

  fixtures.valid.forEach(function(f) {
    var account, iterator

    beforeEach(function() {
      var external = bitcoinjs.HDNode.fromBase58(f.external)
      var internal = bitcoinjs.HDNode.fromBase58(f.internal)

      account = new Account(external, internal)
      iterator = new AddressIterator(external, f.k)
    })

    it('discovers until ' + f.expected.lastChecked + ' for ' + f.description + ' (GAP_LIMIT = ' + f.gapLimit + ')', function(done) {<commit_msg>tests: fix 'discovers until undefined'<commit_after>var assert = require('assert')
var bitcoinjs = require('bitcoinjs-lib')

var Account = require('../src/account')
var AddressIterator = require('../src/iterator')
var discovery = require('../src/discovery')

var fixtures = require('./fixtures/discovery')

describe('Discovery', function() {
  this.timeout(10000)

  fixtures.valid.forEach(function(f) {
    var account, iterator

    beforeEach(function() {
      var external = bitcoinjs.HDNode.fromBase58(f.external)
      var internal = bitcoinjs.HDNode.fromBase58(f.internal)

      account = new Account(external, internal)
      iterator = new AddressIterator(external, f.k)
    })

    it('discovers until ' + f.expected.used + ' for ' + f.description + ' (GAP_LIMIT = ' + f.gapLimit + ')', function(done) {
{'fraction_non_alphanumeric': 0.14950372208436724, 'fraction_numerical': 0.011166253101736972, 'mean_word_length': 4.0883280757097795, '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': '5958573', 'n_tokens_mistral': 511, 'n_tokens_neox': 476, 'n_words': 100}