本文整理汇总了TypeScript中gulp-mocha.default函数的典型用法代码示例。如果您正苦于以下问题:TypeScript default函数的具体用法?TypeScript default怎么用?TypeScript default使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了default函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: Test
export default function Test() {
return gulp.src(helper.getSettings().test, {read: false})
.pipe(mocha({
reporter: 'spec',
compilers: {
ts: require('ts-node').register({
compiler: helper.getSettings().typescriptPath
})
}
}))
.once('end', function () {
process.exit();
})
.on("error", (error) => {
console.error(Util.formatError(error));
process.exit(1)
});
}
示例2: unit
/**
* Runs unit-tests.
*/
@Task()
unit() {
chai.should();
chai.use(require("sinon-chai"));
return gulp.src("./build/es5/test/unit/**/*.js")
.pipe(mocha());
}
示例3: functional
/**
* Runs functional tests.
*/
@Task()
functional() {
chai.should();
chai.use(require("sinon-chai"));
chai.use(require("chai-as-promised"));
return gulp.src("./build/es5/test/functional/**/*.js")
.pipe(mocha());
}
示例4: unit
/**
* Runs unit-tests.
*/
@Task()
unit() {
chai.should();
chai.use(require("sinon-chai"));
chai.use(require("chai-as-promised"));
return gulp.src("./build/compiled/test/unit/**/*.js")
.pipe(mocha());
}
示例5: coverage
/**
* Runs test coverage report.
*/
@Task("coverage", ["preCoverage"])
coverage() {
chai.should();
chai.use(require("sinon-chai"));
chai.use(require("chai-as-promised"));
return gulp.src("./build/es5/test/**/*.js")
.pipe(mocha())
.pipe(istanbul.writeReports());
}
示例6:
gulp.task("test", () => {
return gulp
.src([
"./lib/**/*.js",
"!./lib/cli.js",
"./espowered/**/*.js"
])
.pipe(mocha());
});
示例7: coveragePost
/**
* Runs post coverage operations.
*/
@Task("coveragePost", ["coveragePre"])
coveragePost() {
chai.should();
chai.use(require("sinon-chai"));
chai.use(require("chai-as-promised"));
return gulp.src(["./build/es5/test/functional/**/*.js"])
.pipe(mocha())
.pipe(istanbul.writeReports());
}
示例8: runTests
/**
* Runs mocha tests.
*/
@Task()
runTests() {
chai.should();
chai.use(require("sinon-chai"));
chai.use(require("chai-as-promised"));
return gulp.src(["./build/compiled/test/**/*.js"])
.pipe(mocha({
bail: true,
grep: !!args.grep ? new RegExp(args.grep) : undefined,
timeout: 15000
}));
}
示例9:
gulp.task("test", () => {
gulp.src('test/*.js', {read:false})
.pipe(mocha({reporter: 'nyan'}))
.once('end', () => process.exit());
});