V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
zficode

jest 测试用例问题

  •  
  •   zficode · Dec 27, 2023 · 1440 views
    This topic created in 852 days ago, the information mentioned may be changed or developed.

    在使用 jest 编写测试用例的过程中,会编写某些代码测试库的 API ,只是为了熟悉一些库的使用,并不是测试自己编写的功能。 在这里,我可以很方便的通过 vscode 插件点击 run 去运行,但是我现在不希望全局运行所有的测试用例时执行这个测试用例。

    目前已知的有 test.skip API 可以跳过测试,但是这样会导致 vscode 的 run 按钮失效:

    test.skip();
    
    1 replies    2023-12-27 14:37:57 +08:00
    April5
        1
    April5  
       Dec 27, 2023
    testPathIgnorePatterns
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3456 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 00:36 · PVG 08:36 · LAX 17:36 · JFK 20:36
    ♥ Do have faith in what you're doing.