chai.assert
chai.expect
chai.should
결과는 같음. 사용 문법이 조금씩 다름. 중요 X
중요한 것은 스타일의 일관성을 유지할 것!
let assert = chai.assert;
it("has a prefix of 51 and a length of 16", function() {
assert(detectNetwork("숫자") === "Visa");
});
let expect = chai.expect;
it("has a prefix of 51 and a length of 16", function() {
expect(detectNetwork("숫자")).to.equal("MasterCard");
});
let should = chai.should();
it("has a prefix of 51 and a length of 16", function() {
detectNetwork("숫자").should.equal("Discover");
});