<commit_before>
const helpers = require('../../helpers')

// TODO
module.exports = {
  command: 'get-running <organization-id>',
  desc: 'Get all running results within your organization.',
  builder: {},
  handler: async function (argv) {
    console.log('ERROR: getRunning() not yet implemented in node-ghost-inspector')
    process.exit(1)<commit_msg>add CLI method for getAllRunningTests()<commit_after>
const helpers = require('../../helpers')

module.exports = {
  command: 'get-running <organization-id>',
  desc: 'Fetch a list of the currently-executing results for the entire organization and return the results.',
  builder: {},
  handler: async function (argv) {
    try {
      const client = require('../../../index')(argv.apiKey)
      const result = await client.getAllRunningTests(argv.organizationId)
      helpers.print(result)
    } catch (error) {
      throw new Error(error.message)
    }

    process.exit(0)
{'fraction_non_alphanumeric': 0.14070891514500536, 'fraction_numerical': 0.0021482277121374865, 'mean_word_length': 3.5911330049261085, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3419694', 'n_tokens_mistral': 269, 'n_tokens_neox': 265, 'n_words': 77}