• Packages
  • Themes
  • Documentation
  • Blog
  • Discuss
Sign in

expect

Atom snippet package for npm expect@1.x assertion library
  • #expect
  • #assertion
  • #unit-testing
  • #snippet
MikeBruns
0.6.1 210
0
  • Repo
  • Bugs
  • Versions
  • License
Flag as spam or malicious

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();

I think this package is bad news.

Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.

  • Terms of Use
  • Privacy
  • Code of Conduct
  • Releases
  • FAQ
  • Contact
with by