Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jest test failures #26

Open
BryanWilhite opened this issue Mar 15, 2022 · 1 comment
Open

Jest test failures #26

BryanWilhite opened this issue Mar 15, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@BryanWilhite
Copy link
Owner

BryanWilhite commented Mar 15, 2022

package upgrades lead to these failures 🔬 🔥 in src/utilities/display-item.utility.spec.ts [:octocat: GitHub]:

image

image

@BryanWilhite BryanWilhite added the bug Something isn't working label Mar 15, 2022
@BryanWilhite BryanWilhite self-assigned this Mar 15, 2022
@BryanWilhite
Copy link
Owner Author

BryanWilhite commented Mar 15, 2022

the heart of the matter, causing the second error is this: https://github.com/BryanWilhite/songhay-core/blob/master/src/utilities/display-item.utility.spec.ts#L132

background-compile-time error message:

Conversion of type '{ description: string; displayText: string; groupDisplayText: string; groupId: string; id: string; inceptDate: string; map: { "topic-enterprise-data": string; "group-year-month-2012-09": string; ... 86 more ...; "group-year-month-2012-08"?: undefined; }; modificationDate: string; sortOrdinal: string; childItems: any...' to type 'MenuDisplayItemModel' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
  Type '{ description: string; displayText: string; groupDisplayText: string; groupId: string; id: string; inceptDate: string; map: { "topic-digital-production-web": string; "group-year-month-2014-09": string; ... 86 more ...; "group-year-month-2012-08"?: undefined; }; modificationDate: string; sortOrdinal: string; childIte...' is not comparable to type 'MenuDisplayItemModel'.
    Types of property 'inceptDate' are incompatible.
      Type 'string' is not comparable to type 'Date'.ts(2352)

it looks like the JSON being loaded by Typescript is no longer auto-magically converted to DateTime:

"inceptDate": "2012-09-17T12:32:00",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant