Tools: polymer test --config-file option not mapped correctly to wct --configFile

Created on 24 Oct 2017  路  7Comments  路  Source: Polymer/tools

Description

When testing my app with a specific config file, like stated in the polymer-cli doc:

polymer test --config-file="my.config.json"

The WCT starts my tests but ignores my config file.

When testing my app with the WCT directly, like stated in the WCT doc:

wct --configFile="my.config.json"

It works as expected. I've tried passing the same casing (configFile) through the polymer-cli, but it doesn't recognize the option.

Versions & Environment

  • Polymer CLI: v1.5.7
  • node: v8.7.0
  • Operating System: macOS High Sierra (10.13)

Steps to Reproduce

  1. Create an application project: polymer init application
  2. Add a second wct.conf.json file but with another name and a different configuration
  3. Run it with WCT directly, like explained above, validate the new config file is used
  4. Run it with polymer-cli, like explained above, validate the new config file is not used

Expected Results

Both commands use the provided config file

Actual Results

Only WCT uses the provided config file

Test cli High Available Bug

All 7 comments

Any update?

@pdesjardins90 we're pretty slammed and trying to get to things ASAP. Any chance you want to fix this?

Ok I'll try and have a look

Alright, I'll prefix this by saying that I don't know nodejs that well and I never did any typescript in my life.

The Polymer CLI seems to parse the provided command line options in polymer-cli.ts, line ~182 through a library called command-line-args. This library seems to parse options as kebab-cased, based on this issue.

The WCT options' casing is inconsistent. According to wct --help, they are all kebab-cased, with the exception of these:

  • simpleOutput
  • configFile

My guess is that 'config-file' is recognized by the polymer-cli but ignored when passed to the WCT. If my assumption is correct, I think the PR should be made in WCT to normalize the casing.

What do you think?

I'm going to be getting a fix in for this in the next day or so (hopefully less)

Closed with Polymer/tools#424

It's not released yet but I'll close it anyway, thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

web-padawan picture web-padawan  路  4Comments

emilbillberg picture emilbillberg  路  3Comments

rasto68 picture rasto68  路  4Comments

priyabrat1801 picture priyabrat1801  路  3Comments

MaKleSoft picture MaKleSoft  路  3Comments