•  
      request #35125 Explicitly import jest functions
    Infos
    #35125
    Joris MASSON (jmasson)
    2023-11-14 17:47
    2023-11-14 12:17
    36735
    Details
    Explicitly import jest functions

    Back when we were using Jasmine, testing functions (such as expect, describe, it, etc.) were global and "magically injected" by the test runner. Jest did the same thing, which made it easier to switch.

    I discovered that Jest 26 introduced @jest/globals, which makes it possible to explicitly import testing functions. Since vitest requires such imports, opting-in gradually to @jest/globals will make our work easier when switching to vitest.

    Dev tools
    Empty
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Joris MASSON (jmasson)
    Under implementation
    Empty
    Attachments
    Empty
    References

    Follow-ups