'use strict';

var _chai;

function _load_chai() {
  return _chai = require('chai');
}

var _indexer;

function _load_indexer() {
  return _indexer = _interopRequireDefault(require('../../src/search/indexer'));
}

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

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