fix 16 file treshold
This commit is contained in:
@ -17,8 +17,9 @@ let mocha = function (configArg: INpmtsConfig) {
|
||||
npmtsOra.text('Instrumentalizing and testing transpiled JS')
|
||||
npmtsOra.end() // end npmtsOra for tests.
|
||||
let done = q.defer()
|
||||
let babelCoverageSmartstream = new plugins.smartstream.Smartstream([
|
||||
plugins.gulp.src([plugins.path.join(paths.cwd, 'dist/*.js')]),
|
||||
|
||||
let coverageSmartstream = new plugins.smartstream.Smartstream([
|
||||
plugins.gulp.src([plugins.path.join(paths.cwd, './dist/**/*.js')]),
|
||||
plugins.gulpSourcemaps.init(),
|
||||
plugins.gulpBabel({
|
||||
presets: [
|
||||
@ -28,8 +29,17 @@ let mocha = function (configArg: INpmtsConfig) {
|
||||
plugins.gulpIstanbul({
|
||||
}),
|
||||
plugins.gulpSourcemaps.write(),
|
||||
plugins.gulpInjectModules()
|
||||
plugins.gulpInjectModules(),
|
||||
plugins.through2.obj(
|
||||
(file, enc, cb) => {
|
||||
cb(null, file)
|
||||
},
|
||||
(cb) => {
|
||||
cb()
|
||||
}
|
||||
)
|
||||
])
|
||||
|
||||
let localSmartstream = new plugins.smartstream.Smartstream([
|
||||
plugins.gulp.src([plugins.path.join(paths.cwd, 'test/test.js')]),
|
||||
plugins.gulpBabel({
|
||||
@ -44,11 +54,10 @@ let mocha = function (configArg: INpmtsConfig) {
|
||||
reporters: ['lcovonly', 'json', 'text', 'text-summary']
|
||||
})
|
||||
])
|
||||
|
||||
babelCoverageSmartstream.run()
|
||||
coverageSmartstream.run()
|
||||
.then(
|
||||
() => {
|
||||
plugins.beautylog.info('transpiled code to ES5 for use in mocha')
|
||||
plugins.beautylog.info('code is now transpiled to ES5, instrumented with istanbul, and injected for mocha!')
|
||||
return localSmartstream.run()
|
||||
.then(() => { done.resolve(configArg) }, (err) => {
|
||||
plugins.beautylog.error('Tests failed!')
|
||||
@ -105,7 +114,7 @@ export let run = function (configArg: INpmtsConfig) {
|
||||
.then(coverage)
|
||||
.then(() => {
|
||||
done.resolve(config)
|
||||
})
|
||||
}).catch(err => { console.log(err) })
|
||||
} else {
|
||||
npmtsOra.end()
|
||||
done.resolve(config)
|
||||
|
@ -14,6 +14,7 @@ import * as smartpath from 'smartpath'
|
||||
import * as smartstream from 'smartstream'
|
||||
import * as smartstring from 'smartstring'
|
||||
import * as smartsystem from 'smartsystem'
|
||||
import * as through2 from 'through2'
|
||||
export let sourceMapSupport = require('source-map-support').install() // display errors correctly during testing
|
||||
|
||||
export {
|
||||
@ -30,5 +31,6 @@ export {
|
||||
smartpath,
|
||||
smartstream,
|
||||
smartstring,
|
||||
smartsystem
|
||||
smartsystem,
|
||||
through2
|
||||
}
|
||||
|
Reference in New Issue
Block a user