Public
Edited
Feb 21, 2023
2 forks
Importers
4 stars
Insert cell
Insert cell
it("3 equals 3", () => {
expect(3).to.equal(3);
expect({ a: 1 }).to.deep.equal({ a: 1 });
})
Insert cell
it("1 is undefined", () => {
expect(1).to.be.undefined();
})
Insert cell
it('calls done after 1000ms', done => {
Promises.tick(1000).then(() => done());
})
Insert cell
it('forgets to call done', done => {
//
})
Insert cell
it("1 is undefined within promise callback", (done) => {
Promises.tick(1000).then(() => {
expect(1).to.be.undefined();
done();
});
})
Insert cell
it("3 equals 3 in async test", async () => {
expect(3).to.equal(3);
})
Insert cell
it("1 is undefined within async test", async () => {
await Promises.tick(1000)
expect(1).to.be.undefined();
})
Insert cell
it("async test does not resolve after timeout", async () => {
await Promises.tick(10000)
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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