Skip to content

Instantly share code, notes, and snippets.

@goldbergyoni
Created December 26, 2018 14:20
Show Gist options
  • Select an option

  • Save goldbergyoni/218b321bbcb3a591ab2f26b8288463d3 to your computer and use it in GitHub Desktop.

Select an option

Save goldbergyoni/218b321bbcb3a591ab2f26b8288463d3 to your computer and use it in GitHub Desktop.
Doing It Right Example: We can stay within the test, each test acts on its own set of data
it("When updating site name, get successful confirmation", async () => {
//test is adding a fresh new records and acting on the records only
const siteUnderTest = await SiteService.addSite({
name: "siteForUpdateTest"
});
const updateNameResult = await SiteService.changeName(siteUnderTest, "newName");
expect(updateNameResult).to.be(true);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment