Skip to content

joakin/mocha-babel-watch-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

mocha-babel-watch-test

Test repo to check mocha + babel when watching files.

Illustrates the bug mochajs/mocha#1847

When requiring mocha functions to not use globals, watching doesn't work.

npm install

mocha-babel-watch-test $ mocha -w --compilers js:babel-register test.js

  Array
    #indexOf()
      ✓ should return -1 when the value is not present

  1 passing (82ms)

	# Modify the test.js file

  0 passing (0ms)

If you uncomment the mocha import line, the watcher works fine.

// Comment this to have it work but use evil global variables
import { describe, it } from 'mocha'

About

A test repo with mocha, babel compilation and test watching

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published