Skip to content

Running a function inside exports.config file #12004

Discussion options

You must be logged in to vote

You define testResults which is an async function and apply it to suites like this:

  suites: {
    testResults,
  },

which is incorrect because it doesn't evaluate functions. What you want to do is remove the async and define it as an object:

const testResults = Object.entries(Tests)
  .filter(([key, value]) => value.COUNTRY_RUNTIME.includes(process.env.COUNTRY.toLowerCase())
        && value.STATES_RUNTIME.includes(process.env.STATE.toLowerCase())
        && value.BRAND_RUNTIME.includes(process.env.BRAND.toLowerCase())
        && value.SUITE_RUNTIME.includes(process.env.SUITE.toLowerCase())
        && value.ENVIRONMENT_RUNTIME.includes(process.env.ENV.toLowerCase())
        && value.PLA…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@jurjandrei
Comment options

@christian-bromann
Comment options

Answer selected by jurjandrei
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants