{"id":16690589,"url":"https://github.com/jonkemp/gulp-qunit","last_synced_at":"2025-03-17T00:33:12.667Z","repository":{"id":13396931,"uuid":"16085288","full_name":"jonkemp/gulp-qunit","owner":"jonkemp","description":"Run QUnit unit tests in a headless PhantomJS instance.","archived":false,"fork":false,"pushed_at":"2022-03-27T18:30:06.000Z","size":533,"stargazers_count":24,"open_issues_count":7,"forks_count":19,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-27T15:32:38.515Z","etag":null,"topics":["gulp-plugin","qunit"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonkemp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-20T22:16:13.000Z","updated_at":"2021-10-18T03:38:13.000Z","dependencies_parsed_at":"2022-09-10T12:22:43.545Z","dependency_job_id":null,"html_url":"https://github.com/jonkemp/gulp-qunit","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonkemp%2Fgulp-qunit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonkemp%2Fgulp-qunit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonkemp%2Fgulp-qunit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonkemp%2Fgulp-qunit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonkemp","download_url":"https://codeload.github.com/jonkemp/gulp-qunit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243835942,"owners_count":20355611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gulp-plugin","qunit"],"created_at":"2024-10-12T16:04:21.979Z","updated_at":"2025-03-17T00:33:12.396Z","avatar_url":"https://github.com/jonkemp.png","language":"JavaScript","readme":"# [gulp](https://github.com/gulpjs/gulp)-qunit ![Build Status](https://github.com/jonkemp/gulp-qunit/actions/workflows/main.yml/badge.svg?branch=master) [![Coverage Status](https://coveralls.io/repos/jonkemp/gulp-qunit/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/jonkemp/gulp-qunit?branch=master)\n\n[![NPM](https://nodei.co/npm/gulp-qunit.png?downloads=true)](https://nodei.co/npm/gulp-qunit/)\n\n\u003e Run QUnit unit tests in a headless PhantomJS instance.\n\nRun QUnit unit tests in a PhantomJS-powered headless test runner, providing basic console output for QUnit tests. Uses the [phantomjs](https://github.com/Medium/phantomjs) node module and the [PhantomJS Runner QUnit Plugin](https://github.com/jonkemp/qunit-phantomjs-runner).\n\nInspired by the grunt plugin [grunt-contrib-qunit](https://github.com/gruntjs/grunt-contrib-qunit).\n\n![](screenshot.png)\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/gulp-qunit)\n\n```bash\n$ npm install --save-dev gulp-qunit\n```\n\n## Usage\n\n```js\nvar gulp = require('gulp'),\n    qunit = require('gulp-qunit');\n\ngulp.task('test', function() {\n    return gulp.src('./qunit/test-runner.html')\n        .pipe(qunit());\n});\n```\n\nWith options:\n\n```js\nvar gulp = require('gulp'),\n    qunit = require('gulp-qunit');\n\ngulp.task('test', function() {\n    return gulp.src('./qunit/test-runner.html')\n        .pipe(qunit({'phantomjs-options': ['--ssl-protocol=any']}));\n});\n```\n\nWith page options:\n\n```js\nvar gulp = require('gulp'),\n    qunit = require('gulp-qunit');\n\ngulp.task('test', function() {\n    return gulp.src('./qunit/test-runner.html')\n        .pipe(qunit({'page': {\n            viewportSize: { width: 1280, height: 800 }\n        }}));\n});\n```\n\nYou no longer need this plugin to run QUnit tests in your gulp tasks. Now you can do this with [node-qunit-phantomjs](https://github.com/jonkemp/node-qunit-phantomjs), a stand alone module. It can also be used via command line, and it has an option for more verbose test reporting.\n```js\nvar gulp = require('gulp'),\n    qunit = require('node-qunit-phantomjs');\n\ngulp.task('test', function() {\n    qunit('./qunit/test-runner.html');\n});\n```\n\nWith phantomjs2:\n\n```js\nvar gulp = require('gulp'),\n    qunit = require('gulp-qunit');\n\ngulp.task('test', function() {\n    return gulp.src('./qunit/test-runner.html')\n        .pipe(qunit({'binPath': require('phantomjs2').path}));\n});\n```\n\n## API\n\n### qunit(options)\n\n#### options.timeout\n\nType: `Number`  \nDefault: `5`\n\nPass a number or string value to override the default timeout of 5 seconds.\n\n#### options.phantomjs-options\n\nType: `Array`  \nDefault: `None`\n\nThese options are passed on to PhantomJS. See the [PhantomJS documentation](http://phantomjs.org/api/command-line.html) for more information.\n\n#### options.page\n\nType: `Object`  \nDefault: `None`\n\nThese options are passed on to PhantomJS. See the [PhantomJS documentation](http://phantomjs.org/page-automation.html) for more information.\n\n#### options.binPath\n\nType: `String`\nDefault: require(\"phantomjs\").path\n\nThe option is used to execute phantomjs binary path\n\n#### options.runner\n\nType: `String`\nDefault: require.resolve('qunit-phantomjs-runner')\n\nThis option is used to configure the test runner used to control phantomjs\n\n## License\n\nMIT © [Jonathan Kemp](http://jonkemp.com)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonkemp%2Fgulp-qunit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonkemp%2Fgulp-qunit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonkemp%2Fgulp-qunit/lists"}