jestjs/jest

[Bug]: Manual mocks file name for node protocol imports (node:)

已關閉

#14,040 建立於 2023年3月30日

 (12 則留言) (0 個反應) (0 位負責人)TypeScript (6,653 個分叉)batch import
:bug: BugHelp WantedPinned

倉庫指標

星標
 (45,361 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Version

^29.5.0

Steps to reproduce

I have added minimal code setup to following codesandbox

https://codesandbox.io/p/sandbox/jest-issue-node-protocol-b6ivxb

Expected behavior

To work with node: protocol inputs in manaul mocks without node: in the file name.

Actual behavior

I can get this working on MacOS renaming the file to node:os.ts But does failed checkout in Windows as colon is not permited to use in filename. Also Codesandbox doesn't allows to have colons in the file.

Additional context

No response

Environment

System:
    OS: macOS 12.6.3
    CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
  Binaries:
    Node: 18.14.2 - /usr/local/bin/node
    Yarn: 1.22.19 - ~/.yarn/bin/yarn
    npm: 9.5.0 - /usr/local/bin/npm

貢獻者指南