<commit_before>import fs from 'fs';
import { expect } from 'chai';
import tmp from 'tmp';

// NOTE: use require() here because this how its done in acts
const Apifier = process.env.TEST_BABEL_BUILD ? require('../build/index') : require('../src/index');

if (process.env.TEST_BABEL_BUILD) console.log('Running with TEST_BABEL_BUILD option');

/* global process */

// TODO: run tests against build scripts too!

describe('Apifier.main()', () => {
    it('should throw on invalid args', () => {
        process.env.APIFIER_INTERNAL_PORT = 1234;
        expect(() => {<commit_msg>Update actor.js<commit_after>import fs from 'fs';
import { expect } from 'chai';
import tmp from 'tmp';

// NOTE: use require() here because this is how its done in acts
const Apifier = process.env.TEST_BABEL_BUILD ? require('../build/index') : require('../src/index');

if (process.env.TEST_BABEL_BUILD) console.log('Running with TEST_BABEL_BUILD option');

/* global process */

// TODO: run tests against build scripts too!

describe('Apifier.main()', () => {
    it('should throw on invalid args', () => {
        process.env.APIFIER_INTERNAL_PORT = 1234;
        expect(() => {
{'fraction_non_alphanumeric': 0.15616911130284727, 'fraction_numerical': 0.006902502157031924, 'mean_word_length': 3.9152542372881354, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '1247937', 'n_tokens_mistral': 369, 'n_tokens_neox': 360, 'n_words': 106}