Created
July 3, 2022 18:34
-
-
Save benchristel/9e9f4d53edbe0f2f33725669e4405de0 to your computer and use it in GitHub Desktop.
Using taste in codepen.io
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
<div id="results"/> |
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
import {createSuite, expect, is, runTests, formatTestResultsAsText} from "https://cdn.skypack.dev/@benchristel/taste@0.3.1"; | |
const {test, getAllTests} = createSuite() | |
test("math", { | |
"adds"() { | |
expect(1 + 1, is, 2) | |
} | |
}) | |
const results = await runTests(getAllTests()) | |
document.getElementById("results").innerText = formatTestResultsAsText(results) |
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
#results { | |
white-space: pre-wrap; | |
font-family: monospace; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment