Open jd20 opened 2 years ago
If launch arguments are passed with an undefined value, when read back, those values are received as a string "undefined". For example:
"undefined"
import { device } from 'detox' await device.launchApp({ launchArgs: { myValue: undefined } }) ... import { LaunchArguments } from 'react-native-launch-arguments' const launchArgs = LaunchArguments.value() console.log(inspect(launchArgs)) >>> { detoxSessionId: 'bd1e...', detoxServer: 'ws://localhost:65078', myValue: 'undefined' }
I would expect that when read back, the value should actually be undefined, not a string.
undefined
Passing undefined values also fails on Android, but with an error:
TypeError: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
Problem Description
If launch arguments are passed with an undefined value, when read back, those values are received as a string
"undefined"
. For example:Expected Behavior
I would expect that when read back, the value should actually be
undefined
, not a string.