<commit_before><commit_msg>Add NumberInput intent spec<commit_after>import memo from 'memo-is'
import {mockDOMSource} from '@cycle/dom'
import {Observable} from 'rx'
import intent from '../number-input-intent'

describe('NumberInput-Intent', function() {
  let inputEvents = memo().is(function() {
    return Observable.of({target: {value: 0}});
  });

  beforeEach(() => {
    const domSource = mockDOMSource({
      '.number-input': {
        'input': inputEvents()
      }
    });
    this.intentResult = intent(domSource).newValue$;
  });

  context('when input value 0 entered', () => {

    it('emits the same value', (done) => {
      this.intentResult.subscribe((value) => {
        expect(value).to.eql(0);
        done();
      });
    });

  });
});

{'fraction_non_alphanumeric': 0.1800262812089356, 'fraction_numerical': 0.003942181340341655, 'mean_word_length': 3.2099447513812156, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '6271787', 'n_tokens_mistral': 242, 'n_tokens_neox': 232, 'n_words': 50}