Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- describe("pizza", function() {
- describe("makeAnOrder", function() {
- it("Should return Correct w/ food & drink", function() {
- chai.assert.equal(makeAnOrder({orderedPizza: "the name of the pizza", orderedDrink: "the name of the drink"}),"You just ordered the name of the pizza and the name of the drink.");
- });
- it("Should return Correct w/ food", function() {
- chai.assert.equal(makeAnOrder({orderedPizza: "the name of the pizza."}),"You just ordered the name of the pizza.");
- });
- it("Should return Error when !orderedPizza", function() { //HOW TO MAKE AN ERROR!
- chai.assert.throw(() => {
- makeAnOrder({});
- }, 'You must order at least 1 Pizza to finish the order.');
- });
- });
- describe("getRemainingWork", function() {
- it("Should return Correct when READY", function() {
- chai.assert.equal(getRemainingWork([{pizzaName: "the name of the pizza", status: "ready"}]), "All orders are complete!");
- });
- it("Should return Correct when PREPARING", function() {
- chai.assert.equal(getRemainingWork([{pizzaName: "the name of the pizza", status: "preparing"}]), "The following pizzas are still preparing: the name of the pizza.");
- });
- });
- describe("orderType", function() {
- it("Should return Correct when CARRY OUT", function() {
- chai.assert.equal(orderType(50, "Carry Out"), 45);
- });
- it("Should return Correct when DELIVERY", function() {
- chai.assert.equal(orderType(50, "Delivery"), 50);
- });
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement