Created
May 7, 2019 16:44
-
-
Save odoe/cf5c0538e7171d341e4d93ca831412e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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