Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a unit test of the ordering of the Tasks
- Loading branch information
1 parent
6dbb5df
commit ef6a2ed
Showing
2 changed files
with
632 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
}); |
Oops, something went wrong.