<commit_before>import test from 'ava';
import b3m from './lib';

test('Returns the passed block-class and build a class-string', t => {
  const cn = b3m('button')
  t.is(cn(), 'button')
})

test('Returns the passed string as block in BEM format', t => {
  const cn = b3m('button')
  t.is(cn('max'), 'button__max')
})

test('Returns class-string with multiple classes if you pass more strings', t => {
  const cn = b3m('button')
  t.is(cn('max', 'min'), 'button__max button__min')
})

test('Returns class-string with double dashes if string is passed as array', t => {
  const cn = b3m('button')
  t.is(cn(['clickable']), 'button--clickable')
})<commit_msg>Update tests<commit_after>import test from 'ava';
import b3m from './index';

test('Returns the passed block-class and build a class-string', t => {
  const cn = b3m('button')
  t.is(cn(), 'button')
})

test('Returns the passed string as block in BEM format', t => {
  const cn = b3m('button')
  t.is(cn('max'), 'button__max')
})

test('Returns class-string with multiple classes if you pass more strings', t => {
  const cn = b3m('button')
  t.is(cn('max', 'min'), 'button__max button__min')
})

test('Returns class-string with double dashes if string is passed as array', t => {
  const cn = b3m('button')
  t.is(cn(['clickable']), 'button--clickable')
})

test('Returns passed object into modifier if key is truth', t => {
  const cn = b3m('button')
  t.is(cn({clickable: true}), 'button--clickable')
})

test('Returns passed object without key if prop is false', t => {
  const cn = b3m('button')
  t.is(cn({clickable: false}), 'button')
})

test('Returns passed object without key if prop is false', t => {
  const cn = b3m('button')
  t.is(cn({clickable: true}), 'button--clickable')
})

test('Returns passed object and used key and prop of object since they`re not boolean', t => {
  const cn = b3m('button')
  t.is(cn({is: 'hidden'}), 'button--is-hidden')
})

test('Returns passed object and used key and prop of object and converts the camelCase key into dashes', t => {
  const cn = b3m('button')
  t.is(cn({isHidden: true}), 'button--is-hidden')
  t.is(cn({status: 'isHidden'}), 'button--status-is-hidden')
})
{'fraction_non_alphanumeric': 0.17784926470588236, 'fraction_numerical': 0.006893382352941176, 'mean_word_length': 4.401985111662531, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 16, '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': '1926977', 'n_tokens_mistral': 744, 'n_tokens_neox': 740, 'n_words': 241}