Skip to content

twada/expect-js-to-assert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

expect-js-to-assert

A jscodeshift codemod that transforms from Automattic/expect.js to Node assert.

Build Status NPM version Code Style License

USAGE

$ npm install -g jscodeshift
$ npm install expect-js-to-assert
$ jscodeshift -t node_modules/expect-js-to-assert/transform.js target-dir

FEATURES

matchers

  • .ok()
  • .be(value) (alias .equal)
  • .eql(value)
  • .a(type) (alias .an)
  • .match(regexp)
  • .contain(needle)
  • .length(size)
  • .empty()
  • .property(name, [value])
  • .key(name)
  • .keys(...name)
  • .throw([errorMatcher]) (alias .throwException, .throwError)
  • .within(start, finish)
  • .above(value) (alias .greaterThan)
  • .below(value) (alias .lessThan)
  • .fail([reason])

chains

  • .not
  • .withArgs(...args)

AUTHOR

CONTRIBUTORS

LICENSE

Licensed under the MIT license.

About

A jscodeshift codemod that transforms from expect.js to Node assert

Resources

License

Stars

Watchers

Forks

Packages

No packages published