Skip to content

Instantly share code, notes, and snippets.

@mhassanist
Created February 20, 2022 05:07
Show Gist options
  • Save mhassanist/379ec0ca9a7c2e2cf9b7ec3646f94234 to your computer and use it in GitHub Desktop.
Save mhassanist/379ec0ca9a7c2e2cf9b7ec3646f94234 to your computer and use it in GitHub Desktop.
//take an instance of the contract
let x: number;
//make sure the instance is properly created
beforeEach(() => {
x = 0;
});
describe("add to x", () => {
it("add to x", () => {
x++;
expect(x).toBe(1);
x++;
expect(x).toBe(2);
});
it("should be 2", () => {
expect(x).toBe(2);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment