<commit_before>import { test } from 'ava'

import { execSync } from 'child_process'
import sinon from 'sinon'

import { Config, log } from '../'

// !Config.isDocker && test('Docker test skipped', function(t) {
//   t.pass('not in docker, skip docker tests')
// })

Config.isDocker && test('Docker smoking test', function(t) {
  // const n = execSync('ps a | grep Xvfb | grep -v grep | wc -l').toString().replace(/\n/, '', 'g')
  // t.is(parseInt(n), 1, 'should has Xvfb started')
  t.notThrows(_ => {
    fs.accessSync(Config.BINARY_CHROMIUM, fs.F_OK)
  }, 'should exist xvfb-chrome exectable')
})<commit_msg>test executable in docker<commit_after>import { test } from 'ava'

import { execSync } from 'child_process'
import sinon from 'sinon'

import { Config, log } from '../'

/**
 * need keep this !Config.isDocker because ava need at least one test() inside.
 *   × No tests found in test\docker.spec.js
 */
!Config.isDocker && test('Docker test skipped', function(t) {
  t.pass('not in docker. this test is to prevent AVA `× No tests found in test\docker.spec.js` error.')
})

Config.isDocker && test('Docker smoking test', function(t) {
  // const n = execSync('ps a | grep Xvfb | grep -v grep | wc -l').toString().replace(/\n/, '', 'g')
  // t.is(parseInt(n), 1, 'should has Xvfb started')
  t.notThrows(_ => {
    fs.accessSync(Config.BINARY_CHROMIUM, fs.X_OK)
  }, 'should exist xvfb-chrome exectable')
})
{'fraction_non_alphanumeric': 0.1717314487632509, 'fraction_numerical': 0.0014134275618374558, 'mean_word_length': 3.6887417218543046, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5768465', 'n_tokens_mistral': 515, 'n_tokens_neox': 499, 'n_words': 145}