yeoman / generator-polymer

Scaffold out a Polymer project
http://polymer-project.org
926 stars 149 forks source link

`yo polymer:el x-tag --test` created #209

Closed BLamy closed 9 years ago

BLamy commented 9 years ago

Added a flag for creating the associated WCT test when you are generating an element.

arthurvr commented 9 years ago

This needs a good chunk of unit tests, preferably before we review the rest of the code.

arthurvr commented 9 years ago

Also, to encourage best practices, I feel like the option should be enabled by default. And don't just check for a flag but define an actual option, please.

masonlouchart commented 9 years ago

Just to say this PR is a good idea!. And :+1: for the option instead of a flag.

BLamy commented 9 years ago

If the user has WCT installed (As checked by the presence of test/index.html). The generator will ask them what type of test they would like to generate.

 $ yo polymer:el x-tag
 ? Would you like to include an import in your elements.html file? No
 ? What type of test would you like to create? (Use arrow keys)
 > TDD (default)
   BDD
   None

TDD will copy over a scaffold using suite, setup and test. BDD will copy over a scaffold using describe, before, it.

It will also modify your test/index.html to include the test in WCT.loadSuites.

BLamy commented 9 years ago

Pull 214

BLamy commented 9 years ago

@robdodson You can close this now.