<commit_before>ViewRegistry = require '../src/view-registry'
{View} = require '../src/space-pen-extensions'

fdescribe "ViewRegistry", ->
  registry = null

  beforeEach ->
    registry = new ViewRegistry

  afterEach ->
    registry.clearDocumentRequests()

  describe "::getView(object)", ->
    describe "when passed a DOM node", ->
      it "returns the given DOM node", ->
        node = document.createElement('div')
        expect(registry.getView(node)).toBe node

    describe "when passed a SpacePen view", ->
      it "returns the root node of the view with a .spacePenView property pointing at the SpacePen view", -><commit_msg>Unfocus spec<commit_after>ViewRegistry = require '../src/view-registry'
{View} = require '../src/space-pen-extensions'

describe "ViewRegistry", ->
  registry = null

  beforeEach ->
    registry = new ViewRegistry

  afterEach ->
    registry.clearDocumentRequests()

  describe "::getView(object)", ->
    describe "when passed a DOM node", ->
      it "returns the given DOM node", ->
        node = document.createElement('div')
        expect(registry.getView(node)).toBe node

    describe "when passed a SpacePen view", ->
      it "returns the root node of the view with a .spacePenView property pointing at the SpacePen view", ->
{'fraction_non_alphanumeric': 0.12206572769953052, 'fraction_numerical': 0.0, 'mean_word_length': 3.2350993377483444, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 19, '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': '6588642', 'n_tokens_mistral': 346, 'n_tokens_neox': 337, 'n_words': 115}