反应测试库 RTL:测试响应性设计
本文介绍了反应测试库(RTL):测试响应性设计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试测试一个响应式设计,当屏幕尺寸太窄时,我会隐藏一些文本(以跨度为单位)。
import React from 'react'
import './index.css'
function Welcome(props) {
return (
<div className="container" data-testid="welcome-component">
<span
className="search-detective-emoji"
role="img"
aria-label="search emoji"
>