{"size": 366, "ext": "js", "max_stars_repo_path": "__tests__/rules/AlphaNum.spec.js", "max_stars_repo_name": "kodnificent/form-validator", "max_stars_repo_stars_event_min_datetime": "2020-11-27T21:22:42.000Z", "max_stars_repo_stars_event_max_datetime": "2020-11-27T21:22:42.000Z", "max_issues_repo_path": "__tests__/rules/AlphaNum.spec.js", "max_issues_repo_name": "kodnificent/form-validator", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "__tests__/rules/AlphaNum.spec.js", "max_forks_repo_name": "kodnificent/form-validator", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 24.4, "max_line_length": 51, "alphanum_fraction": 0.6147540984}
import AlphaNum from '../../src/rules/AlphaNum';

describe('AlphaNum rule', () => {
  const rule = new AlphaNum();

  test('should fail validation', () => {
    expect(rule.passes('hello_world')).toBeFalsy();
  });

  test('should pass validation', () => {
    expect(rule.passes('helloworld')).toBeTruthy();
    expect(rule.passes('kod99')).toBeTruthy();
  });
});
