fix(store): add test for moving to the last position
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
22edb6165b
commit
8167f6d85d
|
@ -206,13 +206,13 @@ describe("A store", function () {
|
|||
store.moveBefore("_e", "_c")
|
||||
let debug = store.debug();
|
||||
expect(debug.idList).toEqual(["_a", "_b", "_e", "_c", "_d"])
|
||||
expect(debug.result).toEqual([
|
||||
{text: "a", id: "_a", indented: 0},
|
||||
{text: "b", id: "_b", indented: 1},
|
||||
{text: "e", id: "_e", indented: 2},
|
||||
{text: "c", id: "_c", indented: 2},
|
||||
{text: "d", id: "_d", indented: 3},
|
||||
])
|
||||
expect(debug.result[2]).toEqual({text: "e", id: "_e", indented: 2})
|
||||
})
|
||||
it("moveBefore _d, at-end", function () {
|
||||
store.moveBefore("_d", "at-end")
|
||||
let debug = store.debug();
|
||||
expect(debug.idList).toEqual(["_a", "_b", "_c", "_e", "_d"])
|
||||
expect(debug.result[4]).toEqual({text: "d", id: "_d", indented: 0})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue
Block a user