Open thieplehuu opened 2 years ago
running npm test
on the main branch works successfully for me. Perhaps you checked out the files such that line endings were changed or something? Please show the output of the failing test
this is my screen log when i run test.
i use node v12.22.9
@thieplehuu Parser works for me
test('parser: Broadworks SIPREC payload', (t) => { parseAndVerifyPayload('broadworks-offer-2.txt', '--foobar', t) ; }) ;
tniemczak@debian:~/drachtio-siprec-recording-server$ npm test
drachtio-siprec-recording-server@2.0.2 test NODE_ENV=test node test/ | ./node_modules/.bin/tap-spec
parser: Broadworks SIPREC payload
✔ parsed first SDP
✔ parsed second SDP
✔ parsed caller aor
✔ parsed session id 6ce942a2-1490-4eea-9a14-61e32ca706ba
✔ parsed recording session id: 00FA0800705D4C5DCAAC41
total: 5 passing: 5 duration: 244ms
tniemczak@debian:~/drachtio-siprec-recording-server$
I run test with command : npm test and i receiver error: expected multipart SIPREC body i was debuged and i saw error in file test/parser.js line 35 //// const segments = data.split(
\n${delimiter}
); const regex = /.Content-Type:\s+(.)\n.\n([\s\S.])$/; const req = { payload: [] };/// arr alway null so payload null and show error. please help me. thank a alot.