本文整理匯總了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());
});