Skip to content

Atom snippet package for general expect statements based on the npm expect package https://github.com/mjackson/expect

License

Notifications You must be signed in to change notification settings

MikeBruns/expect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

expect

License MIT Build Build status

Atom snippet package for general expect statements based on mjackson/expect assertion library.

Example

Available Snippets

Require (ES5) / Import (ES6)

Keyword Snippet
requireExpect const expect = require('expect');
importExpect import expect from 'expect';

Assertions

Each assertion comes in two forms.

  1. The full expect().toExist();
  2. Just the assertion function toExist();

The full assetion keywords start with expect followed by the function name: expectToExist

Tip: If you press TAB when using a snippet it will place the cursor in the next brackets.

The short hand is just the function name as a whole: toExist

Keyword Snippet
toExist toExist();
toNotExist toNotExist();
toBe toBe();
toNotBe toNotBe();
toEqual toEqual();
toNotEqual toNotEqual();
toThrow toThrow();
toNotThrow toNotThrow();
toBeA toBeA();
toNotBeA toNotBeA();
toMatch toMatch();
toNotMatch toNotMatch();
toBeLessThan toBeLessThan();
toBeLessThanOrEqualTo toBeLessThanOrEqualTo();
toBeGreaterThan toBeGreaterThan();
toBeLessThanOrEqualTo toBeLessThanOrEqualTo();
toInclude toInclude();
toExclude toExclude();
toIncludeKey toIncludeKey();
toIncludeKeys toIncludeKeys();
toExcludeKey toExcludeKey();
toExcludeKeys toExcludeKeys();
toHaveBeenCalled toHaveBeenCalled();
toHaveBeenNotCalled toHaveBeenNotCalled();
toHaveBeenCalledWith toHaveBeenCalledWith();

About

Atom snippet package for general expect statements based on the npm expect package https://github.com/mjackson/expect

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors