简体   繁体   中英

How to pass an option in to the frisby test through command line

I have to write some test base on a REST API. The end point may change each time running test suits.

Is it possible to pass end point option at command line. For example

jasmine-node --endpoint http://localhost:8080 test-folder

Finally, I found a way. Jasmin add a command line option to pass parameter as follow:

jasmine-node --config <name> <value>

for example:

jasmine-node --config endpoint http://localhost:9091 digidoki

Configs are accessible throw the following var:

process.env['endpoint']

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM