Published
Edited
Aug 18, 2019
Importers
2 stars
Insert cell
Insert cell
Insert cell
test(() => {
expect(2 + 2).toEqual(4)
})
Insert cell
test("arithmetic", () => {
expect(2 + 2).toEqual(4)
})
Insert cell
test(() => {
expect(2 + 2).toEqual(5)
})
Insert cell
test("arithmetic", () => {
expect(2 + 2).toEqual(5)
})
Insert cell
test.skip(() => {
expect(2 + 2).toEqual(4)
})
Insert cell
test.skip("arithmetic", () => {
expect(2 + 2).toEqual(4)
})
Insert cell
Insert cell
expect = require("jest-expect-standalone@24.0.2/dist/expect.min.js").catch(() => window.expect)
Insert cell
test = {
const withMessage = (title, color) =>
html`<span style="font: var(--mono_fonts); color: ${color};">${title}</span>`
const test = (...args) => {
const [action, title] = args.reverse()
action()
return withMessage(`Success: ${title || "test passed"}`, "green")
}
test.skip = (...args) => {
const [action, title] = args.reverse()
return withMessage(`Skipped: ${title || "test skipped"}`, "darkorange")
}
return test
}
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more