ES6 Mocha Snippets installs statistics
By Cory Noonan · VS Code Marketplace · Snippets
Shortcuts to reduce the amount of boiler plate you need to type when creating a test file using mocha.
ES6 Mocha Snippets has 149,867 recorded installs on VS Code Marketplace, ranking #1857 of 2,502 tracked listings.
Rating: 4.80 / 5 from 5 ratings
About ES6 Mocha Snippets
ES6 Mocha Snippets for Visual Studio Code!
Mocha snippets for Visual Studio Code using ES6 syntax. The focus is to keep the code dry leveraging arrow functions and omitting curlies by where possible. The snippets use the Mocha function names for ease of memory that way you don't need to learn new names.

Customize the snippets
In your "User Settings" or workspace settings you an configure the snippets to fit your needs. You will need to restart VS Code make them active.
Semicolons
Turn semicolons on or off. Defaults to true.
{
"mocha-snippets.semicolon": boolean
}
Custom prefix
Use this to add a custom prefix to the snippet. For example if input here 'm-' if you want the snippets to appear when you type m-. Defaults to empty string.
{
"mocha-snippets.custom-prefix": string
}
Custom Glob Pattern
Use this to add a custom glob pattern that you want this extension to apply to. Example '**/*.spec.ts'. Defaults to empty string.
{
"mocha-snippets.glob": string
}
Include arrow functions, normal functions, or both
Use this setting to filter which type of functions you want to use in your snippets. Defaults to 'both'.
{
"mocha-snippets.function-type": 'arrow' | 'function' | 'both'
}
Use single or double quotes
Use this setting to choose the type of quotes you prefer in the snippets that have quotes. Defaults to 'single'.
{
"mocha-snippets.quote-type": 'single' | 'double'
}
Included Snippet Interfaces
BDD
- Before (before)
before(() => ); - Before Named Function (beforeNamed)
before(function someFunctionName(){ }); - Before With Description (beforeDescription)
before('some description', () => ); - Before Each (beforeEach)
beforeEach(() => ); - Before Each Named Function (beforeEachNamed)
beforeEach(function someFunctionName(){ }); - Before Each With Description (beforeEachDescription)
beforeEach('some description', () => ); - After (after)
after(() => ); - After Named Function (afterNamed)
after(function someFunctionName(){ }); - After With Description (afterDescription)
after('some description', () => ); - After Each (afterEach)
afterEach(() => ); - After Each Named Function (afterEachNamed)
afterEach(function someFunctionName(){ }); - After Each With Description (afterEachDescription)
afterEach('some description', () => ); - Describe And It (describeAndIt)
describe('some thing', () => { it('can do the thing', () => { }); }); - Describe (describe)
describe('some thing', () => { }); - It (it)
it('can do the thing', () => { }); - Context And It (contextAndIt)
context('some thing', () => { it('can do the thing', () => { }); }); - Context (context)
context('some thing', () => { });
TDD
- Suite (suite)
suite('some thing', () => { }); - Suite Setup (suiteSetup)
suiteSetup(() => { }); - Suite Teardown (suiteTeardown)
suiteTeardown(() => { }); - Setup (setup)
setup(() => { }); - Teardown (teardown)
teardown(() => { }); - Teardown (teardown)
teardown(() => { }); - Test (test)
test('the thing', () => { }); - Entire Suite (entireSuite)
suite('some thing', () => { suiteSetup(() => { }); test('some functionality', () => { }); suiteTeardown(() => { }); });
Exports
- Exports Suite (exportsSuite)
exports.Foo = { 'Foobar': { 'should foo the bar': () => { }, } };
Arrow Functions
Mocha discourage passing arrow functions (more here). If you don't want to pass arrow functions you can use the f prefix on every snippet:
BDD
- Before Function (fbefore)
before(function () {}); - Before with Description Function (fbeforeDescription)
before('', function () {}); - Before Each Function (fbeforeEach)
beforeEach(function () {}); - Before Each with Description Function (fbeforeEach)
beforeEach('', function () {}); - After Function (fafter)
after(function () {}); - After with Description Function (fafterDescription)
after('', function () {}); - After Each Function (fafterEach)
afterEach(function () {}); - After Each with Description Function (fafterEach)
afterEach('', function () {}); - Describe Function (fdescribe)
describe('', function () {}); - Describe and It Function (fdescribeAndIt)
describe('', function () { it('', function () {}); }); ```…
Description from the VS Code Marketplace listing.
- es6
- javascript
- javascriptreact
- mocha
- typescript
- typescriptreact
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Ratings over time
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Installs on a linear scale. Placement is projected from installs, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (6)Similar VS Code Marketplace Snippets plugins
All 20 ES6 Mocha Snippets alternativesData source
Install counts, average rating, and rating counts come from the public Visual Studio Marketplace gallery API. Installs are cumulative and exclude updates.
Listing: https://marketplace.visualstudio.com/items?itemName=spoonscen.es6-mocha-snippets. First seen Oct 16, 2026; last successful collection Oct 21, 2026. See the methodology.