"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

function _chai() {
  const data = require("chai");

  _chai = function () {
    return data;
  };

  return data;
}

function _indexer() {
  const data = _interopRequireDefault(require("../search/indexer"));

  _indexer = function () {
    return data;
  };

  return data;
}

describe('Indexer', () => {
  describe('tokenizeStr', () => {
    it('should split by camelCase', () => {
      (0, _chai().expect)(_indexer().default.tokenizeStr('camelCase')).to.equal('camel case');
    });
    it('should split by hyphen', () => {
      (0, _chai().expect)(_indexer().default.tokenizeStr('foo-bar')).to.equal('foo bar');
    });
    it('should split by underscore', () => {
      (0, _chai().expect)(_indexer().default.tokenizeStr('foo_bar')).to.equal('foo bar');
    });
    it('should lowercase', () => {
      (0, _chai().expect)(_indexer().default.tokenizeStr('Foo')).to.equal('foo');
    });
    it('should tokenize various combinations', () => {
      (0, _chai().expect)(_indexer().default.tokenizeStr('CamelCase-with-hyphen_and_underscore')).to.equal('camel case with hyphen and underscore');
    });
  });
});