calva icon indicating copy to clipboard operation
calva copied to clipboard

Scanner test error

Open bpringe opened this issue 2 years ago • 1 comments

https://app.circleci.com/pipelines/github/BetterThanTomorrow/calva/6628/workflows/5b7dca1e-3031-4b43-b927-9fd15f1f1ff3/jobs/32667?invite=true#step-103-778

Making this issue to track for later.

bpringe avatar May 09 '23 01:05 bpringe

Good call. I'm pasting in some more context here, in case that log is clean away, and generally to make it easier to discuss:

  1) Scanner
       simple
         symbols
           tokenizes any symbol:
     Property failed after 13 tests
{ seed: 1333249409, path: "12:3:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4", endOnFailure: true }
Counterexample: ["+0##"]
Shrunk 32 time(s)
Got error: Error: expect(received).toBe(expected) // Object.is equality

Expected: "id"
Received: "lit"

Without having checked the code, my guess is that this is with the test data generator. Even with Calva's lax definition of what is an id (which roughly translates to ”symbol”) +0## looks more like a lit(eral) than an id to me. Could maybe be argued that it should be treated as neither, but in practice it probably doesn't matter. Having a look at the generator here I think is what's needed.

PEZ avatar May 09 '23 06:05 PEZ