test: remove null check (#47759)

`querySelectorAll` always returns an array without the need for null check.

Signed-off-by: xiejiahe <xjh22222228@gmail.com>
This commit is contained in:
xiejiahe 2024-03-08 07:12:03 +08:00 committed by GitHub
parent 1c7d133de5
commit 998eaf1849
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -357,7 +357,7 @@ describe('Descriptions', () => {
</Descriptions>, </Descriptions>,
); );
const nestDesc = container.querySelectorAll('.ant-descriptions')?.[1]; const nestDesc = container.querySelectorAll('.ant-descriptions')[1];
const view = nestDesc.querySelector('.ant-descriptions-view'); const view = nestDesc.querySelector('.ant-descriptions-view');
expect(getComputedStyle(view!).border).toBeFalsy(); expect(getComputedStyle(view!).border).toBeFalsy();
}); });