<commit_before>const test  = require('ava').test
const execa = require('execa')
const path  = require('path')

process.chdir('./fixtures')

const NPM_LAUNCH = '../../lib/cli.js'

test('running npm-launch --help', () => {
  // will reject the returned Promise if something goes wrong
  // (test with: execa.shell(`${NPM_LAUNCH} -f`))
  return execa.shell(`${NPM_LAUNCH} --help`)
})

test('running npm-launch', () => {
  return execa.shell(`${NPM_LAUNCH}`)
})

test('running npm-launch default', () => {
  return execa.shell(`${NPM_LAUNCH} default`)
})

test('running npm-launch willFail', (t) => {
  return t.throws(execa.shell(`${NPM_LAUNCH} willFail`))
})<commit_msg>Add some JSON launch scripts tests<commit_after>const test  = require('ava').test
const execa = require('execa')
const path  = require('path')

process.chdir('./fixtures')

const NPM_LAUNCH = '../../lib/cli.js'

test('running npm-launch --help', () => {
  // will reject the returned Promise if something goes wrong
  // (test with: execa.shell(`${NPM_LAUNCH} -f`))
  return execa.shell(`${NPM_LAUNCH} --help`)
})

test('running npm-launch', () => {
  return execa.shell(`${NPM_LAUNCH}`)
})

test('running npm-launch default', () => {
  return execa.shell(`${NPM_LAUNCH} default`)
})

test('running npm-launch willFail', (t) => {
  return t.throws(execa.shell(`${NPM_LAUNCH} willFail`))
})

test('running npm-launch -f launch.scripts.json5 willWork', () => {
  return execa.shell(`${NPM_LAUNCH} -f launch.scripts.json5 willWork`)
})

test('running npm-launch -f launch.scripts.json5 willFail', (t) => {
  return t.throws(execa.shell(`${NPM_LAUNCH} -f launch.scripts.json5 willFail`))
})
{'fraction_non_alphanumeric': 0.20253929866989118, 'fraction_numerical': 0.0024183796856106408, 'mean_word_length': 4.572390572390573, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1324325', 'n_tokens_mistral': 615, 'n_tokens_neox': 596, 'n_words': 124}