class Item extends R.TestView.Item {
    constructor(public data) {
        super()
    }
}
export function run() {
    describe("Test list", () => {
        it("Test basic from datas", () => {
            let el = document.createElement("div")
            let datas = [{ name: "a" }, { name: "b" }]
            let list = Leaf.Widget.makeList<Item>(el)
            list.fill(datas, Item)
            if (list.length != 2) throw new Error("Wrong list length")
            if (list[1].data.name != "b") throw new Error("Invalid list item")
            if (list[0].ListItemData.name != "a") throw new Error("Invalid list item data")
        })
    })
}
