From 78a403c450425ea86fad7df5737a4a53ed4c6714 Mon Sep 17 00:00:00 2001
From: donal <donalspring@gmail.com>
Date: Mon, 16 Apr 2018 12:57:45 +0200
Subject: [PATCH] Template for TDD

---
 tests/unit/vue-components/TodoItem.spec.js |   33 +++++----------------------------
 1 files changed, 5 insertions(+), 28 deletions(-)

diff --git a/tests/unit/vue-components/TodoItem.spec.js b/tests/unit/vue-components/TodoItem.spec.js
index 208ff41..ffdc0ab 100644
--- a/tests/unit/vue-components/TodoItem.spec.js
+++ b/tests/unit/vue-components/TodoItem.spec.js
@@ -19,7 +19,7 @@
     const wrapper = shallow(TodoItem, {
       propsData: { todoItem }
     });
-    expect(wrapper.element).toMatchSnapshot();
+    // expect(wrapper.element).toMatchSnapshot();
   });
 
   it("Renders title as 'Love Front End testing :)'", () => {
@@ -35,27 +35,6 @@
     });
     expect(wrapper.vm.todoItem.completed).toEqual(true);
   });
-
-  // it("won't render additional props", () => {
-  //   const biscuits = "digestives"
-  //   const wrapper = shallow(TodoItem, {
-  //     propsData: { biscuits }
-  //   });
-  //   expect(wrapper.vm.todoItem).toBe("undefined");
-  // });
-
-  // it("renders props.placeholderMsg when passed", () => {
-  //   const msg = "Add a Todo";
-  //   const wrapper = shallow(NewTodo, {
-  //     propsData: { placeholderMsg: msg }
-  //   });
-  //   expect(wrapper.vm._props.placeholderMsg).toMatch(msg);
-  // });
-
-  // it("renders newTodo as empty string", () => {
-  //   const wrapper = shallow(NewTodo, {});
-  //   expect(wrapper.vm.newTodo).toMatch("");
-  // });
 });
 
 let importantTodo;
@@ -75,20 +54,20 @@
     const wrapper = mount(TodoItem, {
       propsData: { todoItem: importantTodo }
     });
-    expect(wrapper.find(".important-flag").exists()).toBe(true);
+    // TODO - test goes here!
   });
   it("should set the colour to red when true", () => {
     const wrapper = mount(TodoItem, {
       propsData: { todoItem: importantTodo }
     });
-    expect(wrapper.find(".red-flag").exists()).toBe(true);
+    // TODO - test goes here!
   });
   it("should set the colour to not red when false", () => {
     importantTodo.important = false;
     const wrapper = mount(TodoItem, {
       propsData: { todoItem: importantTodo }
     });
-    expect(wrapper.find(".red-flag").exists()).toBe(false);
+    // TODO - test goes here!
   });
 
   it("call makImportant when clicked", () => {
@@ -96,8 +75,6 @@
       methods,
       propsData: { todoItem: importantTodo }
     });
-    const input = wrapper.find(".important-flag");
-    input.trigger("click");
-    expect(methods.markImportant).toHaveBeenCalled();
+    // TODO - test goes here!
   });
 });

--
Gitblit v1.9.3