Skip to content

Commit

Permalink
test: add test for network streaming command
Browse files Browse the repository at this point in the history
  • Loading branch information
superhussain committed Jan 17, 2022
1 parent 8ba5e4f commit fa94b05
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/libcamera/vid.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,17 @@ describe('libcamera.vid', () => {
'libcamera-vid --output test.h264 --timeout 10000 --save-pts timestamps.txt'
)
})

it('should return the command used for running a network stream', async () => {
expect(
await libcamera.vid({
timeout: 0,
inline: true,
listen: true,
output: 'tcp://0.0.0.0:1234',
})
).toEqual(
'libcamera-vid --timeout 0 --inline --listen --output tcp://0.0.0.0:1234'
)
})
})

0 comments on commit fa94b05

Please sign in to comment.