在玩笑测试中导入文件时,如何模拟其他文件中使用的“ document.querySelector”?

时间:2019-06-17 09:05:04

标签: jestjs

我试图在我的测试中导入一个包含document.querySelector('meta [name =“ _ csrf”]')。content..JS的JS文件。

它抛出 TypeError:无法读取null的属性“ content” 导入时。

在玩笑测试中导入文件时,如何模拟其他文件中使用的“ document.querySelector”?

0 个答案:

没有答案