Skip to content

Instantly share code, notes, and snippets.

@qunabu
Created November 26, 2020 09:27
Show Gist options
  • Save qunabu/910a45c34bee4cd90641b4f4f667c01b to your computer and use it in GitHub Desktop.
Save qunabu/910a45c34bee4cd90641b4f4f667c01b to your computer and use it in GitHub Desktop.
Test runners
// Jest
describe("Sum numbers", () => {
test("it should sum two numbers correctly", () => {
expect(1 + 2).toEqual(3);
});
});
// Jasmine
describe("Sum numbers", function () {
it("should sum two numbers correctly", function () {
expect(1 + 2).toEqual(3);
});
});
// Mocha
const { expect } = require("chai");
describe("Sum numbers", () => {
it("should add two numbers correctly", () => {
expect(1 + 2).to.equal(3);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment