Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Commit

Permalink
check if starts with talker
Browse files Browse the repository at this point in the history
  • Loading branch information
crisconru committed Jan 9, 2024
1 parent 6daef1c commit 5b912fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@coremarine/nmea-parser",
"version": "1.6.1",
"version": "1.6.2",
"description": "Library to parse NMEA 0183 sentences",
"author": "CoreMarine",
"license": "ISC",
Expand Down
2 changes: 2 additions & 0 deletions tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ describe('Parser', () => {
expect(fakeSentence).not.toBeNull()
expect(NMEALikeSchema.safeParse(fakeSentence).success).toBeTruthy()
if (fakeSentence !== null) {
const starts = fakeSentence.startsWith(talker, 1)
expect(starts).toBeTruthy()
const parsed = parser.parseData(fakeSentence)
expect(parsed).toHaveLength(1)
expect(parsed[0].sentence).toBe(sentence)
Expand Down

0 comments on commit 5b912fa

Please sign in to comment.