{"name":"testling","version":"1.7.4","keywords":["test","browser","headless"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT/X11","_id":"testling@1.7.4","maintainers":[{"name":"substack","email":"substack@gmail.com"},{"name":"ljharb","email":"ljharb@gmail.com"}],"homepage":"https://github.com/substack/testling#readme","bugs":{"url":"https://github.com/substack/testling/issues"},"bin":{"testling":"bin/cmd.js"},"dist":{"shasum":"e3434e4acf8ddaf89ad99e1388af62b7d3bd0e41","tarball":"http://registry-npm.ywwl.com/testling/download/testling-1.7.4.tgz","fileCount":12,"integrity":"sha512-6x0610YunL/39OH087zhrOj09p313BVLah1OoExmSrhRN4ZCyo9T9j0Di7/1qkAFmAI2Qo5qAYLogRdEAj4o4Q==","signatures":[{"sig":"MEUCIQCCv0vDjvLVZueLG08C1MnVBH5itkAqhdYXOEHq73fwdQIgHV333Vilm6VvY8biuhY50uVsN4i4WAEt0d5bV/xPwZ0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":256936,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLToHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrGXQ/9EH0htAgPTUEcnBIUKhEIQuzwHzd46ppWkQjhIHfZyuAUjW1H\r\nTW3vapD07R9TXioaarCvvWOdHzVR92WA6IEPwg5LbI+/jjVuLD4f39m2Fgvd\r\nw/Ou80o5DzAqzU/ZQ3y60P3LVakYJEgYyVnv/vfco6SvQQDrsQrU29/A47Rv\r\nCJf4Sgf7LN0pte6GfQedrjo7O6QOOh8JC/aHssh0hFBITZHxNJ+njpml/GYa\r\nU6CVGf2KYljseSOrS1V7Q6ht6xWNRME8Td9iFETtpsashCoRZskoUqslUirO\r\n4zO7xQ9rdQyvqGsvEeKU0u5nXBS1zWlRxNt6/BNwuunoHvryr7zo0qxXHMuD\r\nm3cw+3geQI1fZkBJUP4iw7x0It2TpeSeDAPP6gDV7sb4a17Gr2vv3QwlwEZ3\r\nm+IH0UO8qdsBmO1758jjx3+8tZogYENpiQH/frsO5K9JfvGWiCfxZJTyEfG9\r\ncZ7svdrgXBF+neeuwToMaVfdtcruLonDLAP/xyJPAsfSUHYZFNPO/ps+UVSp\r\nuKPPc43Ly15Vpk6oocr2P9vV9bZeX0gppQ9u/XEyh3yDnjhEyDw4lzGu8sB/\r\nUyzSoKn1UXyI0AS+lh4JMi2LYco8j3gI5IMAygJ50m0xdl53CzQ51aj3HPG2\r\n0hgmqol15JZYVPrB7X7NsHwhb8Z+QSLsq4w=\r\n=STyF\r\n-----END PGP SIGNATURE-----\r\n","size":68844,"noattachment":false,"key":"/testling/-/testling-1.7.4.tgz"},"engines":{"node":">=0.8"},"funding":{"url":"https://github.com/sponsors/ljharb"},"gitHead":"4eeb0002fa25d41cbec8e52d1e7bcff4bfdb2127","scripts":{"build":"mkdir -p bundle && browserify browser/prelude.js -o bundle/prelude.js","version":"auto-changelog && git add CHANGELOG.md","prebuild":"rimraf bundle","prepublish":"not-in-publish || npm run prepublishOnly","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"","prepublishOnly":"safe-publish-latest && npm run build"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"browserify":"browser.js","repository":{"url":"git://github.com/substack/testling.git","type":"git"},"_npmVersion":"8.19.1","description":"write tests for browser code","directories":{},"_nodeVersion":"18.9.0","dependencies":{"ent":"^0.0.7","glob":"~3.2.11","bouncy":"~3.2.2","jsonify":"~0.0.0","resolve":"~1.22.1","ecstatic":"~0.4.13","optimist":"~0.6.1","browserify":"~3.46.1","cross-spawn":"~5.1.0","shell-quote":"~1.7.3","shallow-copy":"~0.0.1","concat-stream":"~1.6.2","object-inspect":"~1.12.2","browser-launcher":"~1.0.2","xhr-write-stream":"~0.1.2","@tapjs/tap-finished":"^0.0.3"},"_hasShrinkwrap":false,"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","hideCredit":true,"unreleased":false,"commitLimit":false,"backfillLimit":false},"devDependencies":{"tape":"~5.6.1","rimraf":"~3.0.2","in-publish":"~2.0.1","auto-changelog":"~2.4.0","safe-publish-latest":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/testling_1.7.4_1663908359468_0.0253496689349475","host":"s3://npm-registry-packages"},"readme":"# testling\n\nRun [testling-ci](http://ci.testling.com) tests locally.\n\n# example\n\nwrite a test:\n\n``` js\nvar test = require('tape');\n\ntest('beep boop', function (t) {\n    t.plan(2);\n    t.equal(1+1, 2);\n    t.ok(true);\n});\n```\n\nrun your test in a local headless browser:\n\n```\n$ browserify example/test.js | testling\n\nTAP version 13\n# beep boop\nok 1 should be equal\nok 2 (unnamed assert)\n\n1..2\n# tests 2\n# pass  2\n\n# ok\n```\n\nwith an exit code of 0 for successes and non-zero for failures like a good unix\ncitizen\n\nOnce you have a `package.json` with a configured `\"testling\"` field, you can just\ntype:\n\n```\n$ testling\n```\n\nto run all your tests locally just like they will be run on\n[testling-ci](https://ci.testling.com). This includes mocha harnesses, scripts,\nand files parameters.\n\n# usage\n\n```\nusage: testling {DIRECTORY|-} {OPTIONS}\n\nIf there (is no DIRECTORY and stdin is a tty) or the DIRECTORY is \"-\",\njavascript will be read from stdin and executed.\n\nOtherwise, DIRECTORY (or the $CWD) will be checked for a package.json with a\ntestling field.\n\nOPTIONS are:\n\n     --html  Instead of launching a server, show the generated html.\n\n  --no-show  Don't render the console.log() output to the document body.\n\n         -u  Instead of launching a browser, print the url to visit so you can\n             open the browser yourself.\n\n         -x  Launch a browser with an explicit command. By default, chrome or\n             firefox is launched by searching your $PATH.\n\n     --host  Set up the testling url on a specific hostname. Default: localhost\n\n     --port  Set up the testling url on a specific port\n```\n\n# testling field\n\n[Read more about how the package.json \"testling\" field works.](doc/testling_field.markdown)\n\n# code coverage\n\nTo compute code coverage, just use the\n[coverify](https://npmjs.org/package/coverify)\ntransform with `-t coverify` when you run browserify.\n\n[coverify](https://npmjs.org/package/coverify) writes coverage data with\nconsole.log(), so you can pipe the output of testling through to the `coverify`\ncommand to parse the results and give human-readable output:\n\n```\n$ browserify -t coverify test.js | testling | coverify\n\nTAP version 13\n# beep boop\nok 1 should be equal\n\n1..1\n# tests 1\n# pass  1\n\n# ok\n\n# /home/substack/projects/coverify/example/test.js: line 7, column 16-28\n\n  if (err) deadCode();\n           ^^^^^^^^^^^\n\n# /home/substack/projects/coverify/example/foo.js: line 3, column 35-48\n\n  if (i++ === 10 || (false && neverFires())) {\n                              ^^^^^^^^^^^^\n\n```\n\nThe exit code of coverify is non-zero when there are unreachable expressions.\n\n# dependencies\n\nMake sure you have [PhantomJS](https://github.com/ariya/phantomjs) installed; this is the headless browser that testling will run your tests in if you are not using the `-u` option.\n\n# install\n\nFirst, install `browserify` globally so that the `testling` command can find it\nwhen there is no `browserify` in `./node_modules/.bin`:\n\n```\nnpm install -g browserify\n```\n\nthen do:\n\n```\nnpm install -g testling\n```\n\n# license\n\nMIT\n\n![attack of the testlings!](https://web.archive.org/web/20151126095557if_/http://substack.net/images/browsers/war_of_the_browsers.png)\n","publish_time":1663908359708,"_cnpm_publish_time":1663908359708,"dist-tags":{"latest":"1.7.7"}}