Theres a couple things wrong with this. getSecurityModeURL will resolve to an array, not a function. So the line moreUrl={getSecurityModeURL()} will end up causing an error if called in the child.

If you wish getSecurityModeURL to resolve to a single object you need to use .find instead of .filter. So would end up looking like:

const getSecurityModeURL = SecurityModeOptions.find(
   x => x.SecurityMode === securityMode

and then passing it to child

moreUrl={getSecurityModeURL.url || ''}

As far as testing goes, it looks like you have sample data, why can't you test with it? Everything else looks fine.

Related Query

More Query from same tag