fix: 修改错误的case

This commit is contained in:
fujianchao 2024-07-24 11:37:20 +08:00 committed by lmaomaoz
parent 9da08a4bc7
commit 58a6608cde

View File

@ -361,20 +361,14 @@ test('Renderer:number with showAsPercent', async () => {
const {input} = await setup({
suffix: '%',
showAsPercent: true,
value: 1.123,
precision: 3
});
fireEvent.change(input, {target: {value: 1.123}});
fireEvent.blur(input);
await wait(300);
expect(input.value).toBe('112.3%');
fireEvent.change(input, {target: {value: 0.2123}});
fireEvent.blur(input);
await wait(300);
expect(input.value).toBe('21.2%');
expect(input.value).toEqual('112.3%');
fireEvent.change(input, {target: {value: '1.2'}});
fireEvent.change(input, {target: {value: 23.1234}});
fireEvent.blur(input);
await wait(300);
expect(input.value).toBe('120%');
expect(input.value).toEqual('23.123%');
});