Skip to content

bengl/moch6

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

moch6

moch6 is a quick and simple addition to mocha to add a little DSL sugar, using ES6 template strings.

Once this module is required, you can use any of mocha's global functions as tags. This is probably best described with an example.

// before...
describe('something', function() {
    it('should work on node version '+process.version, function(){
        // ...
    })
})

// after ...
require('moch6')
describe `something` (()=>{
    it `should work on node version ${process.version}` (()=>{
        // ...
    })
})

Note that this will only work in an ES6 environment supporting template strings, (and in the example, fat-arrow functions), such as babel or traceur.

License

See LICENSE.txt

About

A fun syntax for mocha, using ES6 template strings.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors