Jest: cannot find module required inside module to be tested (relative path)

前端 未结 5 1344
耶瑟儿~
耶瑟儿~ 2021-02-13 15:49

I have this component:

import React from \'react\';
import VideoTag from \'./VideoTag\';
import JWPlayer from \'./JWPlayer\';

class VideoWrapper extends React.C         


        
5条回答
  •  星月不相逢
    2021-02-13 16:36

    You don't need to add moduleFileExtensions in the configuration for these two options since jest uses ['js', 'jsx', 'json', 'node'] as default file extensions. (Unless you want to specifically skip any option that is)

提交回复
热议问题