[英]Cannot find module 'it' when testing with mocha/chai
我有一个简单的测试
import {topNavigationLinks} from './navigation-links.js';
import {assert,should,expect=} from 'chai';
import {mocha} from 'mocha';
describe('Navigation Links', () => {
it('should have the right value', function () {
expect(topNavigationLinks(123).to.equal([]));
});
});
但我不断收到这个错误
Error: Cannot find module 'it'
有什么线索吗?
错误是将node_modules作为我的Mocha脚本的一部分。 因此,它遍历了所有的node_modules,显然没有找到it语句。 删除那照顾它
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.