Skip to content

Commit

Permalink
Added a unit test of the ordering of the Tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
jonniebigodes committed Jul 14, 2021
1 parent 6dbb5df commit ef6a2ed
Show file tree
Hide file tree
Showing 2 changed files with 632 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/unit/TaskList.spec.js
@@ -0,0 +1,15 @@
import { mount } from "@vue/test-utils";

import TaskList from "../../src/components/TaskList.vue";

//👇 Our story imported here
import { WithPinnedTasks } from "../../src/components/TaskList.stories";

test("renders pinned tasks at the start of the list", () => {
const wrapper = mount(TaskList, {
//👇 Story's args used with our test
propsData: WithPinnedTasks.args,
});
const firstPinnedTask = wrapper.find(".list-item:nth-child(1).TASK_PINNED");
expect(firstPinnedTask).not.toBe(null);
});

0 comments on commit ef6a2ed

Please sign in to comment.