Do not verify source positions in the remark deserializer specs
The following discussion from !88585 (merged) should be addressed:
-
@himkp started a discussion: (+1 comment) Thought: I think we are trying to be too verbose by checking both source positions and the source here. I think checking one should be enough and it would make it easier in the future to change the tests if need be.
My suggestion: modify the
sourceAttrs
function to take just one param:const sourceAttrs = (src) => ({ sourceMapKey: expect.any(string), sourceMarkdown: src, });
My reasoning for not testing the numeric values is that we cannot manually verify them at all. (We would always just copy the attribute from the failing test and put it in the spec to make it pass.) We'd always rely on the string to see if the source is correct or not.
Edited by Himanshu Kapoor