spscript-b
Version:
ShareP0oint Rest Api Wrappers
19 lines (17 loc) • 594 B
text/typescript
import { getContext } from "./testUtils";
describe("Try update", () => {
it("Should create a list item", async () => {
let ctx = await getContext();
let newitem = await ctx
.lists("TestList")
.addItem({ Title: "new item" });
expect(newitem).toHaveProperty("Title");
});
afterAll(async () => {
let ctx = await getContext();
let items = await ctx.lists("TestList").getItems();
return Promise.all(
items.map(item => ctx.lists("TestList").deleteItem(item.Id))
);
});
});