Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>Mocha SnippetsNew to Visual Studio Code? Get it now.
Mocha Snippets

Mocha Snippets

Andrew Smith

|
4,392 installs
| (0) | Free
Mocha snippets
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

VS Code Mocha Snippets

This extension contains Mocha code snippets used by Andrew Smith.

Installation

In order to install an extension you need to launch the Command Palette (Ctrl + Shift + P or Cmd + Shift + P) and type Extensions. There you have either the option to show the already installed snippets or install new ones.

Supported Languages (file extensions)

  • JavaScript (.js)
  • TypeScript (.ts)
  • JavaScript React (.jsx)
  • TypeScript React (.tsx)

Snippets

before (ba)

before(() => {
	$1
});$0

beforeEach (be)

beforeEach(() => {
	$1
});$0

After (aa)

after(() => {
	$1
});$0

afterEach (ae)

afterEach(() => {
	$1
});$0

suite (ste)

suite('$1', () => {
	$2
});$0

suiteSetup (steup)

suiteSetup(() => {
	$1
});$0

setup (setup)

setup(() => {
	$1
});$0

suiteTeardown (stedown)

suiteTeardown(() => {
	$1
});$0

teardown (teardown)

teardown(() => {
	$1
});$0

test (tst)

test('$1', () => {
	$2
});

it (it)

it('$1', () => {
	$2
}$0

describe (dsc)

describe('$1', () => {
	$2
}$0

context (ctx)

context('$1', () => {
	$2
}$0
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft