Giter VIP home page Giter VIP logo

jest-better-snippets's Introduction

Jest Better Snippets

Demo of snippets GIF.

Node Version npm Version Release

Jest Better Snippets is my attempt at speeding up the development of test writing in the Javascript Jest framework. I primarily use vscode however I may try and port this to other IDEs such as Atom in the future.

Feel free to clone this and add whatever you want, or send me some ideas of things that you'd find helpful and I'll add them to the list.

Testing Tests

The github repo associated with this extension tests the current snippets to make sure they all follow the same guidelines.

To Run

npm i โžœ npm test

Documentation

This documentation covers the raw commands and not the placeholders that are put in place. A lot of options that are not specified as async have the option to be async through tab stop placeholder.

Describe Snippets

Trigger Content
des describe()
dese describe.each()
deso describe.only()
dess describe.skip()
desa describe(async)
daa describe(afterAll())
daaa describe(afterAll(async))
dae describe((afterEach()))
daea describe(afterEach(async))
dba describe(beforeAll())
dbaa describe(beforeAll(async))
dbe describe(beforeEach())
dbea describe(beforeEach(async))
di describe(it())
dia describe(it(async))
dt describe(test())
dta describe(test(async))

It Snippets

Trigger Content
it it()
ite it.each()
ito it.only()
its it.skip()
itt it.todo()
ita it(async)
itwe it(exepct())
it2 it() it()
it2a it(async) it(async)

Test Snippets

Trigger Content
tes test()
tese test.each()
teso test.only()
tess test.skip()
testt test.todo()
tesa test(async)
twe test(expect())
t2 test() test()
t2a test(async) test(async)

Setup/Teardown Snippets

Trigger Content
aa afterAll()
aaa afterAll(async)
ae afterEach()
aea afterEach(async)
ba beforeAll()
baa beforeAll(async)
be beforeEach()
bea beforeEach(async)

Turbo Snippets

Describe Everything It/Test (dei/det)
describe('suite description', () => {
    afterAll(async () => {
        
    })

    afterEach(async () => {
        
    })

    beforeAll(async () => {
        
    })

    beforeEach(async () => {
        
    })

    it('test description', async () => {
        expect()
    })
})

jest-better-snippets's People

Contributors

ombowkerbbc avatar dontchewonchewie avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.