Skip to content

Commit

Permalink
[test]: Add error handlings in data parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
mirumirumi committed Oct 23, 2023
1 parent 853224b commit 24a9364
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/services/parse-file.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe("ParseFileService", () => {
}
public override synonymMapping: { [key: string]: string } = {}

public override json(value: string): KLineSource {
public override json(value: string): Result<KLineSource, Error> {
return super.json(value)
}

Expand Down Expand Up @@ -70,7 +70,7 @@ describe("ParseFileService", () => {
volume: 233.359,
},
]
expect(service.json(_1)).toEqual(_1_e)
expect(service.json(_1).val).toEqual(_1_e)

const _2 = `[
{
Expand Down Expand Up @@ -108,7 +108,7 @@ describe("ParseFileService", () => {
volume: 233.359,
},
]
expect(service.json(_2)).toEqual(_2_e)
expect(service.json(_2).val).toEqual(_2_e)
})

test("raw()", () => {})
Expand Down

0 comments on commit 24a9364

Please sign in to comment.