This extension includes the most common mocha snippets. Also compatible with Cypress and similar tools.
In order to install an extension, you need to open the Extensions Palette (Ctrl + Shift + X
or Cmd ⌘ + Shift + X
). There you have either the option to show the already installed snippets or install new ones.
- JavaScript (.js)
- TypeScript (.ts)
- JavaScript React (.jsx)
- TypeScript React (.tsx)
Snippet | Code |
---|---|
describe |
describe("", () => { }); |
context |
context("", () => { }); |
specify |
specify("", () => { }); |
it |
it("should", () => { }); |
before |
before(() => { }); |
beforeNamed |
before("", () => { }); |
beforeEach |
beforeEach(() => { }); |
beforeEachNamed |
beforeEach("", () => { }); |
after |
after(() => { }); |
afterNamed |
after("", () => { }); |
afterEach |
afterEach(() => { }); |
afterEachNamed |
afterEach("", () => { }); |
See the CHANGELOG for details about the changes in each version.