Skip to content

Instantly share code, notes, and snippets.

@odoe
Created May 7, 2019 16:44
Show Gist options
  • Save odoe/9a4e9c123d0c5d7ca16d4ba26e9fce9c to your computer and use it in GitHub Desktop.
Save odoe/9a4e9c123d0c5d7ca16d4ba26e9fce9c to your computer and use it in GitHub Desktop.
// src/tests/unit/widgets/Profile.ts
describe("Profile", () => {
it("default renders correctly", () => {
const h = harness(() => w(Profile, {}));
h.expect(profileAssertion);
});
it("renders given username correctly", () => {
// update the expected result with a given username
const namedAssertion = profileAssertion.setChildren("~welcome", [
"Welcome Kel Varnsen!"
]);
const h = harness(() => w(Profile, { username: "Kel Varnsen" }));
h.expect(namedAssertion);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment