Skip to content

rit/mocha-loader

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm deps chat

Mocha Loader

Allows Mocha tests to be loaded and run via webpack

Install

npm install --save-dev mocha-loader

Usage

Configuration (recommended)

webpack.config.js

module.exports = {
  entry: './entry.js',
  output: {
    path: __dirname,
    filename: 'bundle.js'
  },
  modules: {
    rules: [{
      test: /test.js$/,
      use: 'mocha-loader',
      exclude: /node_modules/,
    }]
  }
}
import test from './test'

CLI

webpack --module-bind 'mocha-loader!./test'
import test from './test'

Require

import test from 'mocha-loader!./test'

Options

Maintainer


Juho Vepsäläinen

Joshua Wiens

Kees Kluskens

Sean Larkin

About

mocha loader module for webpack

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%