Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(portal): delete the excess test usage of the portal #2825

Merged
merged 1 commit into from
Mar 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions src/common/__tests__/portal.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import { renderToString } from 'react-dom/server';
import { render } from '@test/utils';
import Portal from '../Portal';

Expand All @@ -16,16 +15,4 @@ describe('Portal', () => {
unmount();
expect(document.querySelector('#portal')).toBeNull();
});

test('Portal ssr render', () => {
const renderOnServer = () =>
renderToString(
<Portal>
<div id="portal">Hello World</div>
</Portal>,
);

// 目前test会出错,待后续添加lazy可support ssr
expect(renderOnServer).toThrow();
});
});
Loading