<commit_before>fs = require 'fs-plus'
{Disposable} = require 'atom'
{File} = require 'pathwatcher'
{$} = require 'atom-space-pen-views'

describe "Archive viewer", ->
  [archiveView, onDidDeleteCallback, onDidChangeCallback] = []

  beforeEach ->
    spyOn(File::, 'onDidDelete').andCallFake (callback) ->
      onDidDeleteCallback = callback if @getPath().match /.tar/
      new Disposable

    spyOn(File::, 'onDidChange').andCallFake (callback) ->
      onDidChangeCallback = callback if @getPath().match /.tar/
      new Disposable

    waitsForPromise ->
      atom.packages.activatePackage('archive-view')

    waitsForPromise ->
      atom.workspace.open('nested.tar')

    runs -><commit_msg>Lock down regexes more tightly<commit_after>fs = require 'fs-plus'
{Disposable} = require 'atom'
{File} = require 'pathwatcher'
{$} = require 'atom-space-pen-views'

describe "Archive viewer", ->
  [archiveView, onDidDeleteCallback, onDidChangeCallback] = []

  beforeEach ->
    spyOn(File::, 'onDidDelete').andCallFake (callback) ->
      onDidDeleteCallback = callback if @getPath().match /\.tar$/
      new Disposable

    spyOn(File::, 'onDidChange').andCallFake (callback) ->
      onDidChangeCallback = callback if @getPath().match /\.tar$/
      new Disposable

    waitsForPromise ->
      atom.packages.activatePackage('archive-view')

    waitsForPromise ->
      atom.workspace.open('nested.tar')

    runs ->
{'fraction_non_alphanumeric': 0.14356087262491204, 'fraction_numerical': 0.0, 'mean_word_length': 3.6019417475728157, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '349566', 'n_tokens_mistral': 456, 'n_tokens_neox': 435, 'n_words': 90}