Skip to content

Instantly share code, notes, and snippets.

@odoe odoe/Profile.ts
Created May 7, 2019

Embed
What would you like to do?
// tests/unit/widgets/Profile.ts
// Add the assertionTemplate module
import assertionTemplate from "@dojo/framework/testing/assertionTemplate";
...
// Create my assertion
const profileAssertion = assertionTemplate(() =>
v("h1", { classes: [css.root], "~key": "welcome" }, ["Welcome Stranger!"])
);
describe("Profile", () => {
it("default renders correctly", () => {
const h = harness(() => w(Profile, {}));
// Test against my base assertion
h.expect(profileAssertion);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.