DetoxRecorder
DetoxRecorder copied to clipboard
"detox recorder" can not be used as script with npm/yarn
Describe the Bug When using a "detox recorder ..." command through the package.json "scripts" section nothing happens and process exits immediately without error/logs.
To Reproduce package.json
"scripts": {
"detox:ios:recorder": "detox recorder -b \"<APP_ID>\" -s booted -r --outputTestFile \"./test/e2e/NewTest.e2e.js\" --testName \"New Test\""
},
- run
yarn detox:ios:recorder
ornpm run detox:ios:recorder
- process will exit and no output is shown
» yarn detox:ios:recorder
yarn run v1.22.10
$ detox recorder -b "<APP_ID>" -s booted -r --outputTestFile "./test/e2e/NewTest.e2e.js" --testName "New Test"
✨ Done in 0.55s.
On the other hand copying the command above out of the package.json scripts and run it directly in the terminal will start the recording without problems.
Expected Behavior Running a "detox recorder ..." command as package.json script has the same effect as running it directly in the console.
Actual Behavior Running a "detox recorder ..." command as package.json script does nothing.
Screenshots no screens needed
Environment
- macOS: 11.4
- Xcode: 12.5
- iOS Simulator Runtime: 14.5
- Detox CLI version: 18.18.1
- Detox Recorder Version: 1.0.151 (via package.json and also in "node_modules/detox-recorder/package.json), but
detox recorder -v
outputs 1.0.146
Logs no output is shown in log stream if run as script.
Additional Context
- nvm installed
- global yarn through brew
Also facing the same issue. Anyone know of a fix?
Same here, any fix for this ?
I am also facing this
same here
Workaround: "scripts": { "detox:ios:recorder": "node_modules/detox-recorder/DetoxRecorderCLI --bundleId com.example.app --simulatorId booted --outputTestFile 'temp/testFile.ts' --record" }