https://github.com/benoitvallon/unit-test-polymer-element
Code sample based on "Unit Testing Polymer Elements" article from the polymer website
https://github.com/benoitvallon/unit-test-polymer-element
Last synced: 6 months ago
JSON representation
Code sample based on "Unit Testing Polymer Elements" article from the polymer website
- Host: GitHub
- URL: https://github.com/benoitvallon/unit-test-polymer-element
- Owner: benoitvallon
- Created: 2014-12-11T19:27:05.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-12-11T20:28:37.000Z (almost 11 years ago)
- Last Synced: 2025-02-13T19:19:18.308Z (8 months ago)
- Language: CSS
- Size: 133 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
unit-test-polymer-element
=========================Code sample based on "Unit Testing Polymer Elements" article from the polymer website
seed-element
============See the [component page](http://polymerlabs.github.io/seed-element) for more information.
## Getting Started
We've put together a [guide to seed-element](http://www.polymer-project.org/docs/start/reusableelements.html) to help get you rolling.
## Testing Your Element
Add the logic specific to your new element and verify its functionality. Good unit tests are essential to your verification plan but a good way to quickly sanity test your component is to access your demo.html file via a local web server. There are several ways to do this but one easy method is to run a simple web server that ships with Python, using the commands:
```sh
python -m SimpleHTTPServer
```Or other method using NodeJS:
```sh
http-server ./
```This starts a web server on port 8000, so you can test your new element by navigating a browser to `localhost:8000/test/index.html`.
### web-component-tester
The tests are also compatible with [web-component-tester](https://github.com/Polymer/web-component-tester). You can run them on multiple local browsers via:
```sh
npm install -g web-component-tester
wct
```