Skip to content

Commit

Permalink
test: fix test case error.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Nov 1, 2023
1 parent 2836e47 commit 2269435
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 2 additions & 0 deletions core/src/index.tsx
Expand Up @@ -7,6 +7,8 @@ import rehypeAttrs from 'rehype-attr';
import { reservedMeta } from './plugins/reservedMeta';
import { rehypeRewriteHandle, defaultRehypePlugins } from './rehypePlugins';

export * from './preview';

export default React.forwardRef<MarkdownPreviewRef, MarkdownPreviewProps>((props, ref) => {
const rehypePlugins: PluggableList = [
reservedMeta,
Expand Down
2 changes: 2 additions & 0 deletions core/src/preview.tsx
Expand Up @@ -7,6 +7,8 @@ import { type RehypeRewriteOptions } from 'rehype-rewrite';
import { useCopied } from './plugins/useCopied';
import './styles/markdown.less';

export * from './preview';

export interface MarkdownPreviewProps extends Omit<Options, 'children'> {
prefixCls?: string;
className?: string;
Expand Down
12 changes: 4 additions & 8 deletions package.json
Expand Up @@ -10,8 +10,8 @@
"prettier": "prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'",
"pretty-quick": "pretty-quick --staged",
"version": "lerna version --no-changelog --no-git-tag-version --no-push",
"test": "tsbb test --env=jsdom",
"coverage": "tsbb test --env=jsdom --coverage",
"test": "tsbb test",
"coverage": "tsbb test --coverage",
"clean": "lerna clean --yes"
},
"jest": {
Expand All @@ -38,17 +38,13 @@
"prettier": "^2.7.1",
"pretty-quick": "~3.1.3",
"lerna": "^7.1.4",
"tsbb": "^4.1.5",
"jest": "^29.5.0",
"jest-watch-typeahead": "^2.2.2",
"jest-environment-jsdom": "~29.5.0",
"jest-environment-node": "^29.5.0"
"tsbb": "^4.2.4"
},
"eslintConfig": {
"extends": "react-app"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
"node": ">=16.0.0"
},
"workspaces": [
"core",
Expand Down
2 changes: 1 addition & 1 deletion test/index.test.tsx
Expand Up @@ -52,7 +52,7 @@ it('MarkdownPreview Ref', async () => {
const ref = useRef<MarkdownPreviewRef>(null);
useEffect(() => {
if (ref.current) {
expect(Object.keys(ref.current)).toEqual([ 'source', 'mdp' ]);
expect(Object.keys(ref.current)).toEqual([ 'source', 'rehypePlugins', 'mdp' ]);
}
});
return (
Expand Down

0 comments on commit 2269435

Please sign in to comment.