 path = require 'path'
 temp = require('temp').track()
 Snippets = require '../lib/snippets'
-SnippetsAvailable = require '../lib/snippets-available'
 
 describe "Snippets extension", ->
   [editorElement, editor, snippets] = []

      expect(availableSnippetsView.getSelectedItem().name).toBe 'challenge'
      expect(availableSnippetsView.getSelectedItem().bodyText).toBe '$1: ${2:To pass this challenge}'

    it "will write the selected snippet to the editor as snippet", ->
      atom.commands.dispatch availableSnippetsView.filterEditorView[0], 'core:confirm'
      expect(editor.getCursorScreenPosition()).toEqual [0, 18]
      expect(editor.getSelectedText()).toBe 'Test pass you will'

            prefix: "chal"
            body: "$1: ${2:To pass this challenge}"

      delete snippets.availableSnippetsView

      atom.commands.dispatch(editorElement, "snippets:available")
      availableSnippetsView = atom.workspace.getModalPanels()[0].getItem()

    it "renders a select list of all available snippets", ->
      expect(availableSnippetsView.getSelectedItem().prefix).toBe 'test'
      expect(availableSnippetsView.getSelectedItem().name).toBe 'test'
      expect(availableSnippetsView.getSelectedItem().bodyText).toBe '${1:Test pass you will}, young '
