我在React中有一個下拉組件,它用一個標籤和一些選項來呈現一個select元素。下面是我的測試是什麼樣子: import React from 'react';
import { shallow, mount } from 'enzyme';
import Dropdown from './Dropdown';
describe('Dropdown',() => {
it('s
我有一個簡單的測試,我試圖通過酶/摩卡/柴。這是錯誤: 1) <PostList /> should have a container for holding posts:
TypeError: Cannot read property 'length' of undefined
at PostList.render (D:/mydocs/webdev/gitprojs/Re