Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lukawski/polymer-tests-generator
CLI for generating tests for Polymer components
https://github.com/lukawski/polymer-tests-generator
Last synced: about 1 month ago
JSON representation
CLI for generating tests for Polymer components
- Host: GitHub
- URL: https://github.com/lukawski/polymer-tests-generator
- Owner: lukawski
- License: mit
- Created: 2018-05-02T06:23:03.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-06-04T19:16:58.000Z (over 6 years ago)
- Last Synced: 2024-11-11T11:15:08.498Z (about 2 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/polymer-tests-generator
- Size: 112 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# polymer-tests-generator
> Automate your Polymer components tests creation
### What the heck is this?
Aren't your tired of manually creating tests folders/files for Polymer components? I am. And maybe, like me, you are not using `polymer-cli` to generate every new shiny component.
And here comes `polymer-tests-generator`, simple cli intended to automate this process. πππ
### Installation
`npm install -g polymer-tests-generator`
`yarn global add polymer-tests-generator`
### Usage
`polymer-tests [options]`
#### CLI options
`-p, --path - specifies path in which tests generation will occur`
### Okay, but how it works β
Let's say you have structure like this:
```
--siema
--demo
-demo.html
--elo
-elo.1.html
-elo2.html
-elo.html
-siema.html
```Generator will search this structure looking for components. It will exclude everything from your `.gitignore` file and `demo` folder.
When it's done searching it start the magic using seed files and recursive searchβ¨β¨β¨
First it checks for `test` folder and creates it if needed. Then does the same for `test/index.html` file. And lastly it creates tests **only if they don't exist for given component.**
So if you already have a test for `siema.html` it's not gonna override it.
That's it. Simple and fun when machine does it for you!
#### Seed files
* [index.html](https://github.com/lukawski/polymer-tests-generator/blob/master/index-test-seed.html)
* [test.html](https://github.com/lukawski/polymer-tests-generator/blob/master/test-suite-seed.html)### Contributions
Feel free to create [issues](https://github.com/lukawski/polymer-tests-generator/issues/new) and [pull request](https://github.com/lukawski/polymer-tests-generator/compare).
**But please, for any new feature first create an issue so we can discuss it :)**### Todo
- [x] update suites list in `index.html`
- [ ] improve checking if test exists
- [ ] generate tests for mixins