{"id":16690607,"url":"https://github.com/jonkemp/node-qunit-phantomjs","last_synced_at":"2025-03-17T00:33:16.180Z","repository":{"id":13766982,"uuid":"16461830","full_name":"jonkemp/node-qunit-phantomjs","owner":"jonkemp","description":"Run QUnit unit tests in a headless PhantomJS instance without using Grunt","archived":false,"fork":false,"pushed_at":"2020-04-06T18:19:32.000Z","size":316,"stargazers_count":37,"open_issues_count":4,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-19T20:37:14.861Z","etag":null,"topics":["node-qunit-phantomjs","phantomjs","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":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-02T19:57:14.000Z","updated_at":"2022-06-13T07:10:41.000Z","dependencies_parsed_at":"2022-09-23T15:19:57.402Z","dependency_job_id":null,"html_url":"https://github.com/jonkemp/node-qunit-phantomjs","commit_stats":{"total_commits":119,"total_committers":13,"mean_commits":9.153846153846153,"dds":"0.46218487394957986","last_synced_commit":"9fe5fbc439a467ac8998a7a2e7a54fe637624e1d"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonkemp%2Fnode-qunit-phantomjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonkemp%2Fnode-qunit-phantomjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonkemp%2Fnode-qunit-phantomjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonkemp%2Fnode-qunit-phantomjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonkemp","download_url":"https://codeload.github.com/jonkemp/node-qunit-phantomjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221669477,"owners_count":16860891,"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":["node-qunit-phantomjs","phantomjs","qunit"],"created_at":"2024-10-12T16:04:29.468Z","updated_at":"2024-10-27T11:36:32.756Z","avatar_url":"https://github.com/jonkemp.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-qunit-phantomjs [![Build Status](https://travis-ci.org/jonkemp/node-qunit-phantomjs.svg?branch=master)](https://travis-ci.org/jonkemp/node-qunit-phantomjs)\n\n[![NPM](https://nodei.co/npm/node-qunit-phantomjs.png?downloads=true)](https://nodei.co/npm/node-qunit-phantomjs/)\n\n\u003e Run QUnit unit tests in a headless PhantomJS instance without using Grunt.\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/Obvious/phantomjs) node module and the [PhantomJS Runner QUnit Plugin](https://github.com/jonkemp/qunit-phantomjs-runner).\n\nIf you're using [gulp](https://github.com/gulpjs/gulp), you should take a look at the [gulp-qunit](https://github.com/jonkemp/gulp-qunit) plugin.\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/node-qunit-phantomjs)\n\nglobally:\n```bash\n$ npm install -g node-qunit-phantomjs\n```\n\nor locally:\n```bash\n$ npm install --save-dev node-qunit-phantomjs\n```\n\n## Usage\n\nVia command line:\n```bash\n$ node-qunit-phantomjs ./test/fixture.html\n```\nWith options:\n```bash\n$ node-qunit-phantomjs ./test/fixture.html --verbose\n\n$ node-qunit-phantomjs ./test/fixtures/passing.html --timeout=5\n\n$ node-qunit-phantomjs ./test/fixtures/passing.html --timeout 5\n```\nExample setting the viewport size:\n\n```bash\n$ node-qunit-phantomjs ./test/fixture.html 5 '{\"viewportSize\":{\"width\":1000,\"height\":1000}}'\n```\n\nOr require it as a module:\n```js\nvar qunit = require('node-qunit-phantomjs');\n\nqunit('./test/fixture.html');\n```\n\nVerbose option to output list as test cases pass or fail:\n```js\nvar qunit = require('node-qunit-phantomjs');\n\nqunit('./test/fixture.html', { 'verbose': true });\n```\n\nPage option example to set the viewport size::\n```js\nvar qunit = require('node-qunit-phantomjs');\n\nqunit('./test/fixture.html', {'page': {\n    viewportSize: { width: 1280, height: 800 }\n}});\n```\n\nSample [gulp](https://github.com/gulpjs/gulp) task:\n```js\nvar gulp = require('gulp'),\n    qunit = require('node-qunit-phantomjs');\n\ngulp.task('qunit', function() {\n    qunit('./test/fixture.html');\n});\n```\n\n## API\n\n### qunit(path-to-test-runner[, options]);\n\nOpens a test runner file in PhantomJS and logs test results to the console.\n\n#### options.verbose\n\nType: `Boolean`  \nDefault: `none`  \n\nAdd list as test cases pass or fail to output.\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.timeout\n\nType: `Number`  \nDefault: `5`\n\nPass a number or string value to override the default timeout of 5 seconds.\n\n\n#### options.customRunner\n\nType: `String`\nDefault: `None`\n\nA path to a custom PhantomJS runner script. A custom runner can be used to have more control over PhantomJS (configuration, hooks, etc.). Default runner implementations are provided by the [PhantomJS Runner QUnit Plugin](https://github.com/jonkemp/qunit-phantomjs-runner).\n\n## License\n\nMIT © [Jonathan Kemp](http://jonkemp.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonkemp%2Fnode-qunit-phantomjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonkemp%2Fnode-qunit-phantomjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonkemp%2Fnode-qunit-phantomjs/lists"}