<commit_before>/* @flow */

import 'babel-polyfill'
import path from 'path'

import { Builder } from '../src/main'
import type { Message } from '../src/types'

describe('Builder', () => {
  let builder: Builder
  let messages: Array<Message>

  beforeEach(async (done) => {
    const options = { ignoreCache: true, severity: 'error' }
    messages = []
    builder = await Builder.create(path.resolve(__dirname, 'fixtures', 'foo.tex'), options, message => { messages.push(message) })
    done()
  })

  it('verifies that Builder run returns expected true', async (done) => {
    expect(await builder.run('build')).toBeTruthy()
    expect(messages).toEqual([])
    done()
  }, 10000)
})<commit_msg>Add log message display in spec<commit_after>/* @flow */

import 'babel-polyfill'
import path from 'path'

import { Builder } from '../src/main'
import type { Message } from '../src/types'

describe('Builder', () => {
  let builder: Builder
  let messages: Array<Message>

  beforeEach(async (done) => {
    const options = { ignoreCache: true, severity: 'error', reportLogMesssages: true }
    messages = []
    builder = await Builder.create(path.resolve(__dirname, 'fixtures', 'foo.tex'), options, message => { messages.push(message) })
    done()
  })

  it('verifies that Builder run returns expected true', async (done) => {
    expect(await builder.run('build')).toBeTruthy()
    expect(messages).toEqual([])
    done()
  }, 10000)
})
{'fraction_non_alphanumeric': 0.16689847009735745, 'fraction_numerical': 0.006954102920723227, 'mean_word_length': 3.9280821917808217, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '1734852', 'n_tokens_mistral': 448, 'n_tokens_neox': 432, 'n_words': 119}