在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):dflynn15/gulp-jasmine-phantom开源软件地址(OpenSource Url):https://github.com/dflynn15/gulp-jasmine-phantom开源编程语言(OpenSource Language):JavaScript 97.3%开源软件介绍(OpenSource Introduction):gulp-jasmine-phantomA gulp plugin that runs Jasmine tests with either PhantomJS or minijasminenode2. DependenciesThis module uses Before you install If not, ensure you at least have **If you do not have Install
UsageBy default, Basic usage: var gulp = require('gulp');
var jasmine = require('gulp-jasmine-phantom');
gulp.task('default', function () {
return gulp.src('spec/test.js')
.pipe(jasmine());
}); To use var gulp = require('gulp');
var jasmine = require('gulp-jasmine-phantom');
gulp.task('default', function() {
return gulp.src('spec/test.js')
.pipe(jasmine({
integration: true
}));
}); Also, remember you can always run any multitude of tests using different Gulp tasks. For example, running unit tests and integration tests asynchronously. var gulp = require('gulp');
var jasmine = require('gulp-jasmine-phantom');
gulp.task('unitTests', function () {
return gulp.src('spec/test.js')
.pipe(jasmine());
});
gulp.task('integrationTests', function() {
return gulp.src('spec/test.js')
.pipe(jasmine({
integration: true
}));
}); OptionsintegrationType: Run your tests with keepRunnerType: Keep the includeStackTraceType: Prints out a longer stack trace for errors. abortOnFailType: Currently built with integration mode only specHtmlType: Only use in combination with Allows you to specify the HTML runner that Jasmine uses only during integration tests. vendorType: runnerType: Allows you to specify the javascript runner that jasmine uses when running tests. Only use in combination with A list of vendor scripts to import into the HTML runner, either as file
globs (e.g. This option accepts either a single string or an array of strings (e.g.
jasmineVersion (integration tests only)Type: Only use in combination with Specifies the version of Jasmine you want to run. Possible options are in the random (unit tests only)Type: 'boolean' Allows you to run the unit tests in a semi-random order. The random seed will be printed out after the tests have completed to allow for easier debugging. reporterType: Allows you to specify a custom reporter (e.g.
This reporter will also pull in options from seed (unit tests only)Type: 'number' Provides a given seed to Jasmine to run the tests in. Technologies Used
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论