我不明白为什么test.each跳过测试

问题描述

我正在尝试使用玩笑的test.each()函数。这是我的代码:

describe('Parser',() => {
...
  test.each( tests )('%s',(testname,fname) => {
                       var content = fs.readFileSync( path.join( __dirname,fname ) )
                       const document = parse(tokenize(content))
                       expect(document).toMatchSnapshot()
                     }
                    );
})

但是当我开玩笑时,所有这些测试都被跳过了。

 FAIL  packages/orga/src/parse/__tests__/parser.spec.ts   Parser
    ✕ works (27 ms)
    ○ skipped can handle blocks
    ○ skipped can handle broken blocks 1
    ○ skipped can handle broken blocks 2
    ○ skipped can handle drawers
    ○ skipped can handle broken drawers
    ○ skipped can handle timestamp after headline
    ○ skipped can handle nested headlines
    ○ skipped can handle unordered list
    ○ skipped can handle ordered list
    ○ skipped can handle nested list
    ○ skipped can handle multi line list item
    ○ skipped can handle broken multi line list item 1
    ○ skipped can handle broken multi line list item 2
    ○ skipped can handle descriptive list 1
    ○ skipped can handle descriptive list 2
    ○ skipped can handle table
    ○ skipped can handle table with inline style
    ○ skipped can handle html export
    ○ skipped can handle html export block
    ○ skipped can handle affiliated keywords
    ○ skipped can handle invalid affiliated keywords 1
    ○ skipped can handle invalid affiliated keywords 2
    ○ skipped can handle paragraph
    ○ skipped can handle footnote
    ○ skipped can handle multi line footnote
    ○ skipped can handle complex footnote
    ○ skipped knows when headline can stop footnote
    ○ skipped knows when footnote can stop footnote
    ○ skipped knows when empty lines can stop footnote
    ○ skipped can handle TODO keywords
    ○ skipped can handle multiple TODO keywords

我知道,如果没有为创建的测试提供分析该测试报告为跳过的功能,但我想我在这里就可以了。不是吗这是用打字稿写成的事实与此有关吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...