<commit_before>require! {
  assert
  \../Component
  $: cheerio
  $R: reactivejs
}

_it = it

describe 'new Component' ->
  c = new Component

  describe ".template!" ->
    _it "should return ''" ->
      assert.equal '', c.template!

  describe ".attach!" ->
    _it "should return @" ->
      assert.equal c.attach!, c

  describe ".detach!", ->
    _it "should return @" ->
      assert.equal c.detach!, c

  describe ".locals!", ->
    _it "should be {}" ->
      assert.deep-equal {}, c.locals!

  describe ".html!", ->
    markup = '<div class="Component"></div>'
    _it "should return expected markup" !->
      assert.equal c.html!, markup

  describe ".html(false)", ->
    _it "should return ''" !->
      assert.equal c.html(false), ''

  expected = {a:1,b:2}
  describe ".locals(#{JSON.stringify expected})", ->
    _it "should return #{JSON.stringify expected}" !->
      assert.deep-equal c.locals(expected), expected

    _it "should setup two locals: a and b" !->
      assert.deep-equal c.locals!, expected

  describe ".locall(\\foo)", ->
    _it "should return void" !->
      assert.equal c.local(\foo), void

  describe ".locall(\\foo, 1)", ->
    _it "should return 1" !->
      assert.equal c.local(\foo, 1), 1

    _it "should create a reactive state named \\foo" !->
      assert c.state.foo._is-reactive
      old-foo = c.state.foo

    _it "should create a reactive state named \\foo which resolves to 1" !->
      assert.equal c.state.foo!, 1

    var old-foo

    _it "should return 2 when called again with (\\foo, 2)" !->
      old-foo := c.state.foo
      assert.equal c.local(\foo, 2), 2
<commit_msg>test coverage bump +1% lol<commit_after>require! {
  assert
  \../Component
  $: cheerio
  $R: reactivejs
}

_it = it

describe 'new Component' ->
  c = new Component

  describe ".template!" ->
    _it "should return ''" ->
      assert.equal '', c.template!

  describe ".attach!" ->
    _it "should return @" ->
      assert.equal c.attach!, c

  describe ".detach!", ->
    _it "should return @" ->
      assert.equal c.detach!, c

  describe ".locals!", ->
    _it "should be {}" ->
      assert.deep-equal {}, c.locals!

  describe ".html!", ->
    markup = '<div class="Component"></div>'
    _it "should return expected markup" !->
      assert.equal c.html!, markup

  describe ".html(false)", ->
    _it "should return ''" !->
      assert.equal c.html(false), ''

  expected = {a:1,b:2}
  describe ".locals(#{JSON.stringify expected})", ->
    _it "should return #{JSON.stringify expected}" !->
      assert.deep-equal c.locals(expected), expected

    _it "should setup two locals: a and b" !->
      assert.deep-equal c.locals!, expected

  describe ".locall(\\b)", ->
    _it "should return 2" !->
      assert.equal c.local(\b), 2

  describe ".locall(\\foo)", ->
    _it "should return void" !->
      assert.equal c.local(\foo), void

  describe ".locall(\\foo, 1)", ->
    _it "should return 1" !->
      assert.equal c.local(\foo, 1), 1

    _it "should create a reactive state named \\foo" !->
      assert c.state.foo._is-reactive
      old-foo = c.state.foo

    _it "should create a reactive state named \\foo which resolves to 1" !->
      assert.equal c.state.foo!, 1

    var old-foo

    _it "should return 2 when called again with (\\foo, 2)" !->
      old-foo := c.state.foo
      assert.equal c.local(\foo, 2), 2

{'fraction_non_alphanumeric': 0.17021906453522795, 'fraction_numerical': 0.007992895204262877, 'mean_word_length': 2.3891675025075227, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 55, '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': '2083024', 'n_tokens_mistral': 1172, 'n_tokens_neox': 1090, 'n_words': 319}