2

I am using the params : require('../test-data/test_data.json'), in conf.js to read the JSON Test Data for the Test.

However, I want to include more than one JSON file in the params? If yes, then how can the same be used?

Regards,
Sakshi

Sakshi Singla
  • 2,402
  • 1
  • 16
  • 33

1 Answers1

2

It's probably a better idea to pass the filepaths that you want in your params in the config, and actually doing the merge/processing in a helper file. But if your question is asking how to merge 2 objects in javascript: How can I merge properties of two JavaScript objects dynamically?

Community
  • 1
  • 1
hankduan
  • 5,952
  • 1
  • 28
  • 41
  • params : { data1: require('../test-data/some_data.json'), data2: require('../test-data/some_other_data.json') }, Use in spec as: browser.params.data1 OR browser.params.data2 – Sakshi Singla Feb 27 '15 at 05:13