{"size": 427, "ext": "js", "max_stars_repo_path": "easy/c263/test.js", "max_stars_repo_name": "hendrikniemann/dailyprogrammer", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "easy/c263/test.js", "max_issues_repo_name": "hendrikniemann/dailyprogrammer", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "easy/c263/test.js", "max_forks_repo_name": "hendrikniemann/dailyprogrammer", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.4736842105, "max_line_length": 48, "alphanum_fraction": 0.5058548009}
import test from 'ava';
import { count, frequency, timesLog2 } from '.';

test('count', t => {
  t.true(count('aaba', 'a') === 3);
  t.true(count('aaba', 'c') === 0);
  t.true(count('adaba', 'd') === 1);
});

test('frequency', t => {
  t.true(frequency('aaba', 'a') === 3 / 4);
  t.true(frequency('aaba', 'c') === 0);
  t.true(frequency('adaba', 'd') === 1 / 5);
});

test('timesLog2', t => {
  t.true(timesLog2(4) === 8);
});
