✏️4.6 경계 조건 검사하기
// 생산자가 없는 경우
describe('no producers', function(){ // 생산자가 없다.
let noProducers;
beforeEach(function(){
const data = {
name: 'No Producers',
producers: [],
demand: 30,
price: 20,
};
noProducers = new Province(data);
});
it('shortfall', function() {
expect(noProducers.shortfall).equal(30);
});
it('profit', function() {
expect(noProducers.profit).equal(0);
});
});Last updated