<commit_before>{WorkspaceView} = require 'atom'
Scratch = require '../lib/scratch'

# Use the command `window:run-package-specs` (cmd-alt-ctrl-p) to run specs.
#
# To run a specific `it` or `describe` block add an `f` to the front (e.g. `fit`
# or `fdescribe`). Remove the `f` to unfocus the block.

describe "Scratch", ->
  activationPromise = null

  beforeEach ->
    atom.workspaceView = new WorkspaceView
    activationPromise = atom.packages.activatePackage('scratch')

  describe "when the scratch:toggle event is triggered", ->
    it "attaches and then detaches the view", ->
      expect(atom.workspaceView.find('.scratch')).not.toExist()

      # This is an activation event, triggering it will cause the package to be
      # activated.
      atom.workspaceView.trigger 'scratch:toggle'

      waitsForPromise ->
        activationPromise

      runs ->
        expect(atom.workspaceView.find('.scratch')).toExist()
        atom.workspaceView.trigger 'scratch:toggle'
        expect(atom.workspaceView.find('.scratch')).not.toExist()<commit_msg>Deleted unused tests<commit_after>{WorkspaceView} = require 'atom'
Scratch = require '../lib/scratch'

# Use the command `window:run-package-specs` (cmd-alt-ctrl-p) to run specs.
#
# To run a specific `it` or `describe` block add an `f` to the front (e.g. `fit`
# or `fdescribe`). Remove the `f` to unfocus the block.

describe "Scratch", ->
	activationPromise = null

	beforeEach ->
		atom.workspaceView = new WorkspaceView
		activationPromise = atom.packages.activatePackage('scratch')

	describe "when the scratch:toggle event is triggered", ->
		it "opens and then closes the scratch", ->
{'fraction_non_alphanumeric': 0.12613705275924803, 'fraction_numerical': 0.0, 'mean_word_length': 3.7142857142857144, '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': '3361640', 'n_tokens_mistral': 518, 'n_tokens_neox': 501, 'n_words': 151}