{"_id":"wct-mocha","_rev":"8-aa3a6ed902fbb3f4e68a1413c15dc478","time":{"1.0.0-pre.1":"2018-09-04T22:37:02.253Z","created":"2018-10-19T19:29:29.286Z","1.0.0-pre.2":"2018-10-19T19:29:29.584Z","modified":"2022-05-24T03:07:15.945Z","1.0.0-pre.3":"2018-10-25T20:37:55.284Z","1.0.0":"2018-11-06T23:40:36.871Z","1.0.1":"2019-06-05T18:00:40.154Z","1.1.0":"2020-05-01T00:44:39.674Z"},"name":"wct-mocha","dist-tags":{"next":"1.0.0-pre.3","latest":"1.1.0"},"versions":{"1.0.0-pre.2":{"name":"wct-mocha","version":"1.0.0-pre.2","description":"Client-side library for testing web-components with Mocha.","main":"lib/index.js","scripts":{"build":"npm run build:compile && npm run build:browserjs","build:browserjs":"rollup -c","build:compile":"tsc","format":"find src -name \"*.ts\" | xargs clang-format --style=file -i","lint":"tslint -c tslint.json --project .","test":"npm run test:integration","test:integration":"cd test && npm run test:wct"},"keywords":["wct","mocha","test","web-components"],"author":{"name":"The Polymer Project Authors"},"license":"BSD-3-Clause","bugs":{"url":"https://github.com/Polymer/tools/issues"},"homepage":"https://github.com/Polymer/tools/tree/master/packages/web-component-tester","repository":{"type":"git","url":"git+https://github.com/Polymer/tools.git"},"dependencies":{},"devDependencies":{"@types/socket.io":"^1.4.36"},"peerDependencies":{"mocha":"*"},"_id":"wct-mocha@1.0.0-pre.2","_npmVersion":"6.4.1","_nodeVersion":"10.5.0","_npmUser":{"name":"usergenic","email":"brendan@usergenic.com"},"dist":{"integrity":"sha512-VRmUA3OuMR9lwVxDHcWyqfveyOEQ+1TQ6Y2wUX4WvW5jQ0j6XylhyDIN2Yw9A0MkCOrPn/4FWas3GMbVtewLeg==","shasum":"41b964e0c9a5f996a16aeab63749a630150fe3cf","tarball":"https://registry.npmjs.org/wct-mocha/-/wct-mocha-1.0.0-pre.2.tgz","fileCount":76,"unpackedSize":263845,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbyjCaCRA9TVsSAnZWagAAyjEP/jh3Y9ki+VdI0E44tGGp\nH2k28wUh/y62uUY5yO0wCXLImB9QqseybFzVPeBPvgcIuzG+LpZDNJ2jJyj9\nvSgv3KL3LDY6Re7HPbwif4Nnus+fNoK6EQWjEwLRbPfL6ZYCHrHjd8MoynsA\nMi56yLlH6LTjgRRYjZk2asj1h7AP20gVL2BHmnZEd3SP/fnRN7z2EJsFHNDX\n45cLlid07OpvbAMoQcYwAFPz4bYLnzf56rlI8i0GqNrZ65uZQ2X2jWXSGcdO\nuIPgt5YwUvdq2ubqZsV55X8QPElFh6ZZU4hDBpdzCaL/1WtWqGGajPBZ/+Xk\nsPwDQaxSYibtrZP5a4+9VKueEJ42mEXwDZzzmZHrWIWF4cGQOnV+ntb8CoRb\ngtLf+No7qCiiMyzypTE7fDhj7o1L30gzw/Potp9c5vEAgC8AgwbA0TQEe1ZM\nLHjQMGokJ7Sfn27f2ACX8g/XpPAElQ6AyL4Oj9LCPpbUlgozNR/dH5hFsbuJ\nrwHUwVeMFtCDmJYtJn7OVtNqLVsRhh+Ca5RxZdxvCkwTGmyY2JTNQ7/Vb0Qt\nYA24wlwqalAStmgP83Sai5MrVbrVABrvQJ7SdjRfY1q3LO6MjI4D3n88dFeh\n2UT5I6h30RTmffBnIYrOVTp/S7ousb61aXnPQImr4z/w1x97uRmHXRvDDD8f\nB18a\r\n=3WTW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC268iBQRczpB5/K1mWW2u52D+7Zd1G3EwOXc/s7EXNxQIhAJLHbObdavnU6jS5iYtODb2l3tTZRwHM6VBNzaJpwUuq"}]},"maintainers":[{"name":"usergenic","email":"brendan@usergenic.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/wct-mocha_1.0.0-pre.2_1539977369286_0.061877129961595"},"_hasShrinkwrap":false},"1.0.0-pre.3":{"name":"wct-mocha","version":"1.0.0-pre.3","description":"Client-side library for testing web-components with Mocha.","main":"lib/index.js","scripts":{"build":"npm run build:compile && npm run build:browserjs","build:browserjs":"rollup -c","build:compile":"tsc","format":"find src -name \"*.ts\" | xargs clang-format --style=file -i","lint":"tslint -c tslint.json --project .","test":"npm run test:integration","test:integration":"cd test && npm run test:wct"},"keywords":["wct","mocha","test","web-components"],"author":{"name":"The Polymer Project Authors"},"license":"BSD-3-Clause","bugs":{"url":"https://github.com/Polymer/tools/issues"},"homepage":"https://github.com/Polymer/tools/tree/master/packages/web-component-tester","repository":{"type":"git","url":"git+https://github.com/Polymer/tools.git"},"dependencies":{},"devDependencies":{"@types/socket.io":"^1.4.36"},"peerDependencies":{"mocha":"*"},"readme":"[![NPM version](http://img.shields.io/npm/v/wct-mocha?style=flat-square)](https://npmjs.org/package/wct-mocha)\n[![Build Status](http://img.shields.io/travis/Polymer/tools.svg?style=flat-square)](https://travis-ci.org/Polymer/tools)\n[![Gitter](http://img.shields.io/badge/slack-join%20chat%20%E2%86%92-brightgreen.svg?style=flat-square)](https://polymer-slack.herokuapp.com/)\n\n`wct-mocha` makes testing your web components a breeze!\n\nYou get a streamlined browser-based testing environment, designed to work with [web-component-tester](https://github.com/Polymer/tools/tree/master/packages/web-component-tester) or on its own.\n\n # Getting Started\n\n## Install mocha and wct-mocha as devDependencies\n\n```bash\n$ npm install --save-dev mocha\n$ npm install --save-dev wct-mocha\n```\n\n## Install `web-component-tester` or `polymer-cli` globally\n\n```bash\n$ npm install --global web-component-tester\n$ npm install --global polymer-cli\n```\n\n## Run `wct` or `polymer test`\n\n```bash\n$ wct --npm\n$ polymer test --npm\n```\n\n## `.html` Suites\n\nYour test suites can be `.html` documents. For example,\n`test/awesomest-tests.html`:\n\n```html\n<!doctype html>\n<html>\n<head>\n  <meta charset=\"utf-8\">\n  <script src=\"../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js\"></script>\n  <script src=\"../node_modules/mocha/mocha.js\"></script>\n  <script src=\"../node_modules/chai/chai.js\"></script>\n  <script src=\"../node_modules/@polymer/test-fixture/test-fixture.js\"></script>\n  <script src=\"../node_modules/wct-mocha/wct-mocha.js\"></script>\n</head>\n<body>\n  <awesome-element id=\"fixture\"></awesome-element>\n  <script type=\"module\">\n    import {AwesomeElement} from '../src/awesome-element.js';\n    suite('<awesome-element>', () => {\n      test('is awesomest', () => {\n        const element = document.getElementById('fixture');\n        chai.assert.instanceOf(AwesomeElement);\n        chai.assert.isTrue(element.awesomest);\n      });\n    });\n  </script>\n</body>\n</html>\n```\n\n## `.js` Suites\n\nAlternatively, you can write tests in separate `.js` sources. For example,\n`test/awesome-tests.js`:\n\n```js\nsuite('AwesomeLib', () => {\n  test('is awesome', () => {\n    assert.isTrue(AwesomeLib.awesome);\n  });\n});\n```\n\n## Special Features\n\n### Nested Suites\n\nTo help support this case, you can also directly define an index that will load\nany desired tests:\n\n```html\n<!doctype html>\n<html>\n  <head>\n    <meta charset=\"utf-8\">\n    <script src=\"../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js\"></script>\n    <script src=\"../node_modules/mocha/mocha.js\"></script>\n    <script src=\"../node_modules/wct-mocha/wct-mocha.js\"></script>\n  </head>\n  <body>\n    <script>\n      WCT.loadSuites([\n        'awesome-tests.js',\n        'awesomest-tests.html',\n      ]);\n    </script>\n  </body>\n</html>\n```\n\n_When you use `wct` or `polymer test` on the command line, it is generating an\nindex like this for you based on the suites you ask it to load._\n\n### Web Components Support\n\nBy default, WCT will defer tests until the `WebComponentsReady` event has been\nemitted by `@webcomponents/webcomponents-loader.js` or one of its polyfill\nbundles.  This saves you from having to wait for elements to upgrade and all\nthat yourself.\n\nIf you need to test something that occurs before that event, the \n[`testImmediate` helper](https://github.com/Polymer/web-component-tester/blob/master/browser/environment/helpers.js#L29-41) \ncan be used.\n\nAlternately, if you are not using the `@webcomponents/webcomponentjs` polyfills\nor loader or otherwise simply want tests to run as soon as possible, you can\ndisable this delay by setting `WCT.waitForFrameworks = false` (though, they are\nstill async due to Mocha).\n\n### Mocha\n\nWCT supports Mocha's [TDD][mocha-tdd] (`suite`/`test`/etc) and [BDD][mocha-bdd]\n(`describe`/`it`/etc) interfaces, and will call `mocha.setup`/`mocha.run` for\nyou. Just write your tests, and you're set.\n\n\n## Custom Environments\n\nIf you would like to have WCT load libraries on your behalf, you can define a\nlist of scripts to load. There are two ways of doing this:\n\nInside your test code (before `wct-mocha/wct-mocha.js` is loaded):\n```html\n<script>\n  WCT = {\n    environmentScripts: [\n      '../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js',\n      '../node_modules/mocha/mocha.js',\n      '../node_modules/chai/chai.js',\n      '../node_modules/@polymer/test-fixture/test-fixture.js'\n      // Include anything else that you like!\n    ]\n  };\n```\n\nAlternatively, `web-component-tester` can pass the entire value of the WCT block\nobject here straight from the `clientOptions` key in `wct.conf.json`.\n\nA reference of the default configuration can be found at\n[browser/config.ts](browser/config.ts).\n\n### Use any web server\n\nIf you prefer not to use WCT's command line tool, you can also run WCT tests\ndirectly in a browser via a web server of your choosing and still make use of\nall of its features.\n\nMake sure that the `wct-mocha/wct-mocha.js` script is accessible by your web\nserver, and have your tests load it after loading `mocha/mocha.js`.\n\n<!-- References -->\n[mocha]:      http://mochajs.org/                   \"Mocha Test Framework\"\n[mocha-bdd]:  http://mochajs.org/#bdd-interface     \"Mocha's BDD Interface\"\n[mocha-tdd]:  http://mochajs.org/#tdd-interface     \"Mocha's TDD Interface\"\n[test-fixture]: https://github.com/PolymerElements/test-fixture \"Easy DOM fixture testing\"\n","readmeFilename":"README.md","_id":"wct-mocha@1.0.0-pre.3","_npmVersion":"6.4.1","_nodeVersion":"10.5.0","_npmUser":{"name":"usergenic","email":"brendan@usergenic.com"},"dist":{"integrity":"sha512-zbYSjGNpQXD36uI7DV877+UttNmVCAUXZebtkSPufEO/Aq8nvtkxUbqV7IPqM/vYslnapM9iauq0ftYNsuk9Mg==","shasum":"4d41171b3f32d3e298adad379bafd19b2b987f68","tarball":"https://registry.npmjs.org/wct-mocha/-/wct-mocha-1.0.0-pre.3.tgz","fileCount":76,"unpackedSize":265369,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0imjCRA9TVsSAnZWagAAAdUP/3hpfi5fX1yVMHKAUj8n\nrlVqviGl1Aw8xR6dCA8c8viNmhOMsM1w0pcKX7baQAjsAGK16PQvdapFaMnq\nCQvol74nLLhg6LSF2ZSaMT6yNgRRC0nt8ccPa4a+erbutuuFCtSh765aiguZ\n/sbTG+HOmUV3FyKrICXwgOOM/ayq9UES+tuhQuYCUBgt3EjaSqq2dsm6YmOW\nr4BZ90YoT2TDIbXmU32YjqaogcKbt4d2jcybrKssuGkVFbWtzKb+xFnHcl7g\nLA9xeo1fPL4NFKBz4lw5gCFP4yayXgij+URaKn2E9PzZBUopzNTV9vleBetQ\n+fvMyJhhzj0en5q72J6qdBuc9muYRsb4JkzuWVTM3FKq8DSQCL8dJ0dh2apc\nOFHEb/HTiuDLDwGEwkgc0DmplF1fq1hCR269ExxgfcBgS7hUvOElXJXZV2ja\n4s5egHBrVMChLGPCsELo7rfW4kfOpxy7e7oBTa2041PJLkAUnAFyET5va2cp\nCVzZ258ro1FrFJ/7aGMlfTVwdsuxQrN0rqTVJa3z6TOogLs2AvWm7urlyKku\njnv4pam07H7Ayi9pekKcSUe/D9EaBE+L1+aeqIowSE95Fw7nhwirhTeEh6vE\nUYVdXj6YzTShIhtGIBB203ZhIy+0lry0LIpL9rIkKoiqDaUh2Vex7GmkVEBN\nXKE5\r\n=JCpA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrZyXeL3zQ8UL7PTdPSZmaeYhuBPa02HrKyAUUoFXIIAIhAJFJXaCWPT0W+o7c/3XOmFdhmjOS7R5DzHn7ub1ig7bY"}]},"maintainers":[{"name":"usergenic","email":"brendan@usergenic.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/wct-mocha_1.0.0-pre.3_1540499875142_0.9431044954020043"},"_hasShrinkwrap":false},"1.0.0":{"name":"wct-mocha","version":"1.0.0","description":"Client-side library for testing web-components with Mocha.","main":"lib/index.js","scripts":{"build":"npm run build:compile && npm run build:browserjs","build:browserjs":"rollup -c","build:compile":"tsc","format":"find src -name \"*.ts\" | xargs clang-format --style=file -i","lint":"tslint -c tslint.json --project .","test":"npm run test:integration","test:integration":"cd test && npm run test:wct"},"keywords":["wct","mocha","test","web-components"],"author":{"name":"The Polymer Project Authors"},"license":"BSD-3-Clause","bugs":{"url":"https://github.com/Polymer/tools/issues"},"homepage":"https://github.com/Polymer/tools/tree/master/packages/web-component-tester","repository":{"type":"git","url":"git+https://github.com/Polymer/tools.git"},"dependencies":{},"devDependencies":{"@types/socket.io":"^1.4.36"},"peerDependencies":{"mocha":"*"},"_id":"wct-mocha@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.9.0","_npmUser":{"name":"usergenic","email":"brendan@usergenic.com"},"dist":{"integrity":"sha512-rvDjW4kJMV8/lpihKMDHMZwycT5ALtoLni/Q0Ggdg1rPRpIW5pjoslSR/UIl2gWRMYqAs9nFRVYxASwEYG6brA==","shasum":"2e83938572cb854740773cf1dc21f25358446c62","tarball":"https://registry.npmjs.org/wct-mocha/-/wct-mocha-1.0.0.tgz","fileCount":76,"unpackedSize":265466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb4iZ1CRA9TVsSAnZWagAAunYP/0gz88zFLIlvZfoXpKDl\nA1ek9/lmS2S+XXpV9TR9OIZqD6vMAQskuwVdWaNzezAVFgTYoJdVImgJqXgU\nNoRlz3Yszfx5x8JaUK7W23aHFZgGs8T85DxiZSQHgobUFUfxf6bwr5Gq3ni8\nupMg7dR5UG3hl3SpsFCRwrBSENb6BHYzvsxXlBBXhjoFAiwLy0KStim5KQGq\nB5TQkLKUps2elMc4Y9pXLy5KyXOwNzdqEpE2AGinf1gTf/ahey7vzrgb67iB\nkjJAG8bJ5uwtt8PUrdm2uwmPACzzMnTcH5iRd59rqZQ0ywpFFE33yd9S3LmS\nR9BPin0lpCq1CK8egZw2tuyp17eUp2Sll8tqWUM3pLO0XIeka5XhU0xsFXY+\nAL9e0qJBXkYR8OKzjnoIXqkcqeg16KCXLxcVi6ZtKRUeJVUlMU6Dq2guCtJa\nlrfZ8catlG3tcJFaFtJB7O5qihxSbe7PiDYkA3tB3/sBO2CHyirJdjT42e+e\nCmMLpPiNiPMEmQSZczFtOC/Dwx9XPZfvmbJ3bx48ayTwJTuhwlkF86NdtF69\nbiEjZFn+4rZ/q7iYnNei/kCIqts70UOWoxSxH8oLnubHBiSBE+JMPs/MBar1\n8yf80mm47OfHWUTjVvUMZqiCiudD1AfuPs2gOQQGy+1zVw3sqWQXnInunsVO\nZWf1\r\n=gNZF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGCgzcaDwpVmaErNaYirZmzmrjCb7iyYi749M2Cr7A3QIgAvL8dvS3u46j8lywuwvPVXeC0Sbj9zY1Dxb353X9hGU="}]},"maintainers":[{"name":"usergenic","email":"brendan@usergenic.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/wct-mocha_1.0.0_1541547636620_0.7319029645117634"},"_hasShrinkwrap":false},"1.0.1":{"name":"wct-mocha","version":"1.0.1","description":"Client-side library for testing web-components with Mocha.","main":"lib/index.js","scripts":{"build":"npm run build:compile && npm run build:browserjs","build:browserjs":"rollup -c","build:compile":"tsc","format":"find src -name \"*.ts\" | xargs clang-format --style=file -i","lint":"tslint -c tslint.json --project .","test":"npm run test:integration","test:integration":"cd test && npm run test:wct"},"keywords":["wct","mocha","test","web-components"],"author":{"name":"The Polymer Project Authors"},"license":"BSD-3-Clause","bugs":{"url":"https://github.com/Polymer/tools/issues"},"homepage":"https://github.com/Polymer/tools/tree/master/packages/web-component-tester","repository":{"type":"git","url":"git+https://github.com/Polymer/tools.git"},"dependencies":{},"devDependencies":{"@types/socket.io":"^1.4.36"},"peerDependencies":{"mocha":"*"},"_id":"wct-mocha@1.0.1","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-7k4krdiFcODjdo9uAxHDNpFm8AwFZUhKdUXMIdoJZzF6NHq3aONrvv/uPYvTDGYZxap4mEO53kSl/RDKIv8b8g==","shasum":"296723bacc131a2e5cdaf642e459cb9a1311a230","tarball":"https://registry.npmjs.org/wct-mocha/-/wct-mocha-1.0.1.tgz","fileCount":79,"unpackedSize":276696,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+ANICRA9TVsSAnZWagAAz30P/3rJIf6O01TDwS7o+vMa\nbZX6rCsdldSX9hP7J3CJDeyrlRhIZ0fwNiQyb3daPoCwkN3qp++WAOANWfKj\nvurKzatbfROrkJzD7W1UC16cdDe+C6RmJMsimsNMXzo21c8RtGQqC9uuXlzV\nfEeqB65yy4Hydd4957ZNQRLQcSfgfEq1dU+dw9urIYZqQCg3uwrrfACyyY+r\nMzfrS+4y59mdCwYlKhW1P5NZH06s9DOxSsBh51MhJOr9zPDnfY6bZKxLYFMZ\njx5s/8NWDkxOx3rH2GU8l2l13aWvddRpbWoW54L9lJYO8uPu6SC9e8jG4kQp\nif2E79wnLusmnnSB+kwWjvMqmY28NR5Ck4FiVgU8s7rU9FhZDYZ2OxtOHD0A\nh1F6z3GP+6pN623plwsjxtSCY2f9S7HXQnW+aALibW5rIp9bCp8xWOeNE6e+\n3q1RljEChGEMpJkvQzL0Rd/D9EbRphlCYo9/127OZji2EegqHl1hjhxra2r3\ngJRUJUUmLioyJMjj0bQ4xpGgHHWh0zkdu58vqxMYACObieBQNni1NsYThns8\nKChKfxvo1pTmgZ+AeTskdqFaxMdPoRJL/38hUnPlbpq++g/MhJIDP9ICeW0R\n/iOeWfx/Tsr2I9myf7VYZbpTwu51dNEdj9CTVxa47p400j6qNEz8qVXcW4Sy\nv5ZH\r\n=I8OK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE8yUIaX7HtYaQw/y7XxDdKfoo9qeH9oaR4B4RTTddlhAiAYr0Uxd3PY9cRirKEcdpEs7akxCEccYuw6mw4Gs2smYQ=="}]},"maintainers":[{"name":"usergenic","email":"brendan@usergenic.com"}],"_npmUser":{"name":"usergenic","email":"brendan@usergenic.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/wct-mocha_1.0.1_1559757640015_0.9070003532384578"},"_hasShrinkwrap":false},"1.1.0":{"name":"wct-mocha","version":"1.1.0","description":"Client-side library for testing web-components with Mocha.","main":"lib/index.js","scripts":{"build":"npm run build:compile && npm run build:browserjs","build:browserjs":"rollup -c","build:compile":"tsc","format":"find src -name \"*.ts\" | xargs clang-format --style=file -i","lint":"tslint -c tslint.json --project .","test":"npm run test:integration","test:integration":"cd test && npm run test:wct"},"keywords":["wct","mocha","test","web-components"],"author":{"name":"The Polymer Project Authors"},"license":"BSD-3-Clause","bugs":{"url":"https://github.com/Polymer/tools/issues"},"homepage":"https://github.com/Polymer/tools/tree/master/packages/web-component-tester","repository":{"type":"git","url":"git+https://github.com/Polymer/tools.git"},"dependencies":{},"devDependencies":{"@types/socket.io":"^1.4.36","@types/trusted-types":"^1.0.4"},"peerDependencies":{"mocha":"*"},"_id":"wct-mocha@1.1.0","_nodeVersion":"12.13.0","_npmVersion":"6.14.1","dist":{"integrity":"sha512-Wq7xtXFtsCs4bZxjjgRp1PKV3sx7NrSl1JqEVI4zF0/yavlYa9hRMO/+73u1ZScnHc5kIKNPT3KBsoCaQI3+MQ==","shasum":"a03747162aa7c35e41e4659a9b09db10648d1889","tarball":"https://registry.npmjs.org/wct-mocha/-/wct-mocha-1.1.0.tgz","fileCount":79,"unpackedSize":277493,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeq3D4CRA9TVsSAnZWagAAPIAP/2OGKQeokUcHCh63pPV0\n7Ar+ACBTt+oT5DqVOirjPzlA/Ju9N2GLTjvcnChH+qsv54JI6MgsuL1hxIcU\nTLMoGRRsNcsd4BhDDOeXWB7P1TdP8104F601kIwiirnes9q9WD0CB9pDTE64\nFyzWq6c1P8ZJnu69324gsaMsfcWTnJzlhstDVacHWxHZyQTPdCpmM2vVkhaY\ndHDjEslQFlJ7T4Tmbh/aI0rrAVh1DToHZYSuIcNqxq2BWCFl46yPy6E/xFz1\nHQv6Pf7jIX2uNPcn1xFYofuIX+aXcBbUYtiLsC6Pi1dsANKC50BcY/5jLxJF\nRSqNgKpHU6KVXoyvAHKf5VC49OYff+9kVHUBgDqZxfhCSdFHS/+5cD94Fpkf\nU187ajSbv5Hv8nZGlz3un12c2b+TqJ44AgjHBsTSJ9scrBiBO7i8vAUNlGh2\n0osj7sSWEiSbgLvk3yByMRuBv7wrIS+9LhGLFvDeOL6TAZAhUwYx2xPmy36g\nUJUnqfnPKkRjcJ2jB1aJ1l++5OknGGX01RB+cKPHdY16WNW6TfUgNAMRT1uc\ni+I7F2XBU5OWFN7VRc+bL3VJ26HeANCvCdPg3jrsGB9l11sgZJodt72axp7A\n6C9afF92bG1TzM0Lwp3C5amrSXGITmBgPCZxhclNq9R2tel8e1aSP2evJwrk\nCk+8\r\n=o4NM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICRhRalyOBgEVZeeINn+kcuInMViHko4gQxcoE6AeQBAAiBMb/gAMJTBqFRaqG8n/lhXqy+a0Qy7NLf+UA29ztPcdQ=="}]},"maintainers":[{"name":"usergenic","email":"brendan@usergenic.com"}],"_npmUser":{"name":"usergenic","email":"brendan@usergenic.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/wct-mocha_1.1.0_1588293879541_0.35272773066770835"},"_hasShrinkwrap":false}},"maintainers":[{"name":"usergenic","email":"brendan@usergenic.com"}],"description":"Client-side library for testing web-components with Mocha.","homepage":"https://github.com/Polymer/tools/tree/master/packages/web-component-tester","keywords":["wct","mocha","test","web-components"],"repository":{"type":"git","url":"git+https://github.com/Polymer/tools.git"},"author":{"name":"The Polymer Project Authors"},"bugs":{"url":"https://github.com/Polymer/tools/issues"},"license":"BSD-3-Clause","readme":"[![NPM version](http://img.shields.io/npm/v/wct-mocha?style=flat-square)](https://npmjs.org/package/wct-mocha)\n[![Build Status](http://img.shields.io/travis/Polymer/tools.svg?style=flat-square)](https://travis-ci.org/Polymer/tools)\n[![Gitter](http://img.shields.io/badge/slack-join%20chat%20%E2%86%92-brightgreen.svg?style=flat-square)](https://polymer-slack.herokuapp.com/)\n\n`wct-mocha` makes testing your web components a breeze!\n\nYou get a streamlined browser-based testing environment, designed to work with [web-component-tester](https://github.com/Polymer/tools/tree/master/packages/web-component-tester) or on its own.\n\n # Getting Started\n\n## Install mocha and wct-mocha as devDependencies\n\n```bash\n$ npm install --save-dev mocha\n$ npm install --save-dev wct-mocha\n```\n\n## Install `web-component-tester` or `polymer-cli` globally\n\n```bash\n$ npm install --global web-component-tester\n$ npm install --global polymer-cli\n```\n\n## Run `wct` or `polymer test`\n\n```bash\n$ wct --npm\n$ polymer test --npm\n```\n\n## `.html` Suites\n\nYour test suites can be `.html` documents. For example,\n`test/awesomest-tests.html`:\n\n```html\n<!doctype html>\n<html>\n<head>\n  <meta charset=\"utf-8\">\n  <script src=\"../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js\"></script>\n  <script src=\"../node_modules/mocha/mocha.js\"></script>\n  <script src=\"../node_modules/chai/chai.js\"></script>\n  <script src=\"../node_modules/@polymer/test-fixture/test-fixture.js\"></script>\n  <script src=\"../node_modules/wct-mocha/wct-mocha.js\"></script>\n</head>\n<body>\n  <awesome-element id=\"fixture\"></awesome-element>\n  <script type=\"module\">\n    import {AwesomeElement} from '../src/awesome-element.js';\n    suite('<awesome-element>', () => {\n      test('is awesomest', () => {\n        const element = document.getElementById('fixture');\n        chai.assert.instanceOf(AwesomeElement);\n        chai.assert.isTrue(element.awesomest);\n      });\n    });\n  </script>\n</body>\n</html>\n```\n\n## `.js` Suites\n\nAlternatively, you can write tests in separate `.js` sources. For example,\n`test/awesome-tests.js`:\n\n```js\nsuite('AwesomeLib', () => {\n  test('is awesome', () => {\n    assert.isTrue(AwesomeLib.awesome);\n  });\n});\n```\n\n## Special Features\n\n### Nested Suites\n\nTo help support this case, you can also directly define an index that will load\nany desired tests:\n\n```html\n<!doctype html>\n<html>\n  <head>\n    <meta charset=\"utf-8\">\n    <script src=\"../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js\"></script>\n    <script src=\"../node_modules/mocha/mocha.js\"></script>\n    <script src=\"../node_modules/wct-mocha/wct-mocha.js\"></script>\n  </head>\n  <body>\n    <script>\n      WCT.loadSuites([\n        'awesome-tests.js',\n        'awesomest-tests.html',\n      ]);\n    </script>\n  </body>\n</html>\n```\n\n_When you use `wct` or `polymer test` on the command line, it is generating an\nindex like this for you based on the suites you ask it to load._\n\n### Web Components Support\n\nBy default, WCT will defer tests until the `WebComponentsReady` event has been\nemitted by `@webcomponents/webcomponents-loader.js` or one of its polyfill\nbundles.  This saves you from having to wait for elements to upgrade and all\nthat yourself.\n\nIf you need to test something that occurs before that event, the \n[`testImmediate` helper](https://github.com/Polymer/web-component-tester/blob/master/browser/environment/helpers.js#L29-41) \ncan be used.\n\nAlternately, if you are not using the `@webcomponents/webcomponentjs` polyfills\nor loader or otherwise simply want tests to run as soon as possible, you can\ndisable this delay by setting `WCT.waitForFrameworks = false` (though, they are\nstill async due to Mocha).\n\n### Mocha\n\nWCT supports Mocha's [TDD][mocha-tdd] (`suite`/`test`/etc) and [BDD][mocha-bdd]\n(`describe`/`it`/etc) interfaces, and will call `mocha.setup`/`mocha.run` for\nyou. Just write your tests, and you're set.\n\n\n## Custom Environments\n\nIf you would like to have WCT load libraries on your behalf, you can define a\nlist of scripts to load. There are two ways of doing this:\n\nInside your test code (before `wct-mocha/wct-mocha.js` is loaded):\n```html\n<script>\n  WCT = {\n    environmentScripts: [\n      '../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js',\n      '../node_modules/mocha/mocha.js',\n      '../node_modules/chai/chai.js',\n      '../node_modules/@polymer/test-fixture/test-fixture.js'\n      // Include anything else that you like!\n    ]\n  };\n```\n\nAlternatively, `web-component-tester` can pass the entire value of the WCT block\nobject here straight from the `clientOptions` key in `wct.conf.json`.\n\nA reference of the default configuration can be found at\n[browser/config.ts](browser/config.ts).\n\n### Use any web server\n\nIf you prefer not to use WCT's command line tool, you can also run WCT tests\ndirectly in a browser via a web server of your choosing and still make use of\nall of its features.\n\nMake sure that the `wct-mocha/wct-mocha.js` script is accessible by your web\nserver, and have your tests load it after loading `mocha/mocha.js`.\n\n<!-- References -->\n[mocha]:      http://mochajs.org/                   \"Mocha Test Framework\"\n[mocha-bdd]:  http://mochajs.org/#bdd-interface     \"Mocha's BDD Interface\"\n[mocha-tdd]:  http://mochajs.org/#tdd-interface     \"Mocha's TDD Interface\"\n[test-fixture]: https://github.com/PolymerElements/test-fixture \"Easy DOM fixture testing\"\n","readmeFilename":"README.md"}