<commit_before>const fs = require('fs-plus')
const path = require('path')
const season = require('season')
const temp = require('temp').track()
const runAtom = require('./helpers/start-atom')

fdescribe('Smoke Test', () => {
  // Fails on win32
  if (process.platform !== 'darwin') {
    return
  }

  const atomHome = temp.mkdirSync('atom-home')

  beforeEach(() => {
    jasmine.useRealClock()
    season.writeFileSync(path.join(atomHome, 'config.cson'), {
      '*': {
        welcome: {showOnStartup: false},
        core: {
          telemetryConsent: 'no',
          disabledPackages: ['github']
        }
      }
    })
  })

  it('can open a file in Atom and perform basic operations on it', async () => {
    const tempDirPath = temp.mkdirSync('empty-dir')
    const filePath = path.join(tempDirPath, 'new-file')

    fs.writeFileSync(filePath, '', {encoding: 'utf8'})

    runAtom([tempDirPath], {ATOM_HOME: atomHome}, async client => {
      console.log('>>> Waiting for root directories')
      const roots = await client.treeViewRootDirectories()
      expect(roots).toEqual([tempDirPath])

      console.log('>>> Waiting for editor to open')
      await client.execute(async () => await atom.workspace.open(filePath))

      console.log('>>> Waiting for editor to exist')
      const textEditorElement = await client.$('atom-text-editor')
      await textEditorElement.waitForExist(5000)

      console.log('>>> Waiting for there to be one pane item')
      await client.waitForPaneItemCount(1, 1000)
<commit_msg>Pass in filePath as an argument<commit_after>const fs = require('fs-plus')
const path = require('path')
const season = require('season')
const temp = require('temp').track()
const runAtom = require('./helpers/start-atom')

fdescribe('Smoke Test', () => {
  // Fails on win32
  if (process.platform !== 'darwin') {
    return
  }

  const atomHome = temp.mkdirSync('atom-home')

  beforeEach(() => {
    jasmine.useRealClock()
    season.writeFileSync(path.join(atomHome, 'config.cson'), {
      '*': {
        welcome: {showOnStartup: false},
        core: {
          telemetryConsent: 'no',
          disabledPackages: ['github']
        }
      }
    })
  })

  it('can open a file in Atom and perform basic operations on it', async () => {
    const tempDirPath = temp.mkdirSync('empty-dir')
    const filePath = path.join(tempDirPath, 'new-file')

    fs.writeFileSync(filePath, '', {encoding: 'utf8'})

    runAtom([tempDirPath], {ATOM_HOME: atomHome}, async client => {
      console.log('>>> Waiting for root directories')
      const roots = await client.treeViewRootDirectories()
      expect(roots).toEqual([tempDirPath])

      console.log('>>> Waiting for editor to open')
      await client.execute(async filePath => await atom.workspace.open(filePath), filePath)

      console.log('>>> Waiting for editor to exist')
      const textEditorElement = await client.$('atom-text-editor')
      await textEditorElement.waitForExist(5000)

      console.log('>>> Waiting for there to be one pane item')
      await client.waitForPaneItemCount(1, 1000)

{'fraction_non_alphanumeric': 0.14734455958549222, 'fraction_numerical': 0.007772020725388601, 'mean_word_length': 3.3568406205923838, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 37, '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': '1759440', 'n_tokens_mistral': 967, 'n_tokens_neox': 932, 'n_words': 229}