Comparing version 1.0.0 to 1.0.1
@@ -62,8 +62,8 @@ 'use strict'; | ||
var arrayedParams = parameters.map(function (param) { | ||
var arrayParams = parameters.map(function (param) { | ||
return Array.isArray(param) ? param : [param]; | ||
}); | ||
var isAsync = isAsyncTest(arrayedParams, test); | ||
arrayedParams.forEach(function (param, index) { | ||
var isAsync = isAsyncTest(arrayParams, test); | ||
arrayParams.forEach(function (param, index) { | ||
it(makeTitle.apply(undefined, [].concat(_toConsumableArray(param), [index])), makeTestBody(param, test, isAsync)); | ||
@@ -70,0 +70,0 @@ }); |
@@ -53,8 +53,8 @@ import { vsprintf } from 'sprintf-js'; | ||
const arrayedParams = parameters.map(param => { | ||
const arrayParams = parameters.map(param => { | ||
return Array.isArray(param) ? param : [param]; | ||
}); | ||
const isAsync = isAsyncTest(arrayedParams, test); | ||
arrayedParams.forEach((param, index) => { | ||
const isAsync = isAsyncTest(arrayParams, test); | ||
arrayParams.forEach((param, index) => { | ||
it( | ||
@@ -61,0 +61,0 @@ makeTitle(...[...param, index]), |
{ | ||
"name": "mocha-each", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Parameterized test utility for Mocha", | ||
@@ -12,3 +12,4 @@ "main": "build/index.js", | ||
"precoveralls": "npm run coverage", | ||
"coveralls": "nyc report --reporter=text-lcov | coveralls" | ||
"coveralls": "nyc report --reporter=text-lcov | coveralls", | ||
"preversion": "npm test && npm run build" | ||
}, | ||
@@ -43,5 +44,5 @@ "keywords": [ | ||
"esdoc": "^0.4.4", | ||
"eslint": "^1.10.3", | ||
"eslint": "^2.0.0", | ||
"eslint-plugin-markdown": "^1.0.0-beta.1", | ||
"glob": "^6.0.4", | ||
"glob": "^7.0.0", | ||
"gulp": "^3.9.1", | ||
@@ -48,0 +49,0 @@ "gulp-babel": "^6.1.2", |
# Mocha-Each - Parameterized Test for Mocha | ||
[![npm version](https://badge.fury.io/js/mocha-each.svg)][npm-version] | ||
[![Build Status](https://travis-ci.org/ryym/mocha-each.svg?branch=master)][travis-ci] | ||
@@ -8,2 +9,3 @@ [![Coverage Status](https://coveralls.io/repos/github/ryym/mocha-each/badge.svg?branch=master)][coveralls] | ||
[npm-version]: https://badge.fury.io/js/mocha-each | ||
[travis-ci]: https://travis-ci.org/ryym/mocha-each | ||
@@ -10,0 +12,0 @@ [coveralls]: https://coveralls.io/github/ryym/mocha-each?branch=master |
12719
214