{"size": 927, "ext": "js", "max_stars_repo_path": "tests/HarmlessRansomNote.spec.js", "max_stars_repo_name": "dmgv/algorithms-and-datastructures", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "tests/HarmlessRansomNote.spec.js", "max_issues_repo_name": "dmgv/algorithms-and-datastructures", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "tests/HarmlessRansomNote.spec.js", "max_forks_repo_name": "dmgv/algorithms-and-datastructures", "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": 34.3333333333, "max_line_length": 130, "alphanum_fraction": 0.6612729234}
import { expect } from 'chai';
import harmlessRansomNote from '../src/HarmlessRansomNote';

describe('Harmless Ranson Note', () => {

  it('should have a harmlessRansomNote() function', () => {
    expect(harmlessRansomNote).to.be.a('function');
  });

  it('should return true when true 😏 ', () => {
    expect(harmlessRansomNote('it is true', 'If you are saying that it is true I will belive')).to.be.true;
  });

  it('should return false when false 😏 ', () => {
    expect(harmlessRansomNote('it is false', 'If you are saying that this it is true I do not belive')).to.be.false;
  });

  it('should return false when the number of word is not enought', () => {
    expect(harmlessRansomNote('beetlejuice beetlejuice beetlejuice','Sorry! I will only speak beetlejuice one time')).to.be.false;
  });

  it('should return false if nothing is passed', () => {
    expect(harmlessRansomNote('Diego','')).to.be.false;
  });

});
