Skip to content

[Bug]: mockapi in e2e test, logic to compare float is not correct #9944

@weidongxu-microsoft

Description

@weidongxu-microsoft

Describe the bug

mockapi in test https://github.com/microsoft/typespec/blob/main/packages/http-specs/specs/encode/duration/mockapi.ts

On test of duration as float, in query param and header param, it compares with e.g. 35625, which fails other same float value of 35625.0 etc.

Please fix these mockapi, to make it compare the float number (not its string representation).

Reproduction

run test with e.g. 35625.0 as input

Checklist

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions