{"size": 952, "ext": "js", "max_stars_repo_path": "src/common/isHTMLTag/isHTMLTag.spec.js", "max_stars_repo_name": "npranto/regexer", "max_stars_repo_stars_event_min_datetime": "2018-06-12T01:10:57.000Z", "max_stars_repo_stars_event_max_datetime": "2019-02-26T05:35:36.000Z", "max_issues_repo_path": "src/common/isHTMLTag/isHTMLTag.spec.js", "max_issues_repo_name": "npranto/regexer", "max_issues_repo_issues_event_min_datetime": "2018-06-12T08:52:44.000Z", "max_issues_repo_issues_event_max_datetime": "2018-06-23T17:43:47.000Z", "max_forks_repo_path": "src/common/isHTMLTag/isHTMLTag.spec.js", "max_forks_repo_name": "npranto/regexer", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": 47, "max_forks_count": null, "avg_line_length": 36.6153846154, "max_line_length": 91, "alphanum_fraction": 0.5493697479}
import { assert } from 'chai';
import isHTMLTag from './isHTMLTag';

describe('Regexer', () => {
  describe('isHTMLTag()', () => {
    it('should return true when passed \'<img src="./img/cat.png" />\'', () => {
      assert.equal(isHTMLTag('<img src="./img/cat.png" />'), true);
    });
    it('should return true when passed \'<body>\'', () => {
      assert.equal(isHTMLTag('<body>'), false);
    });
    it('should return false when passed \'<h1> Hello World <h1>\'', () => {
      assert.equal(isHTMLTag('<h1> Hello World <h1>'), false);
    });
    it('should return false when passed \'\'', () => {
      assert.equal(isHTMLTag(''), false);
    });
    it('should return true when passed \'<h1 class="center"> Hello World! </h1>\'', () => {
      assert.equal(isHTMLTag('<h1 class="center"> Hello World! </h1>'), true);
    });
    it('should return false when passed null', () => {
      assert.equal(isHTMLTag(null), false);
    });
  });
});
