【发布时间】:2020-03-09 02:36:30
【问题描述】:
我只是想在开箱即用的 react 测试工具上测试类型,它看起来很直接我想做的事情,但它就是不喜欢它。另外,其他类型可以吗?
test('Expect label to be of type string', () => {
const testString = 'Test value'
const { getByDisplayValue } = render(<Label text={testString}/>);
expect(getByDisplayValue).toBe(string);
});
【问题讨论】:
标签: reactjs react-testing-library