Skip to content

Commit

Permalink
feat(jest-preset): enable ESM support for Typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
Emanuel Kluge committed Jun 7, 2021
1 parent 0a3f066 commit be56286
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/jest-preset/jest-preset.js
Expand Up @@ -31,6 +31,7 @@ module.exports = {
: {
'ts-jest': {
babelConfig: require('./transforms/babel.js').babelConfig,
useESM: true,
},
},
moduleNameMapper: {
Expand Down
3 changes: 2 additions & 1 deletion packages/spec/integration/typescript-unit-testing/index.tsx
@@ -1,11 +1,12 @@
import { importComponent } from 'hops';
import type { FC } from 'react';
import * as React from 'react';

import Headline from './headline';

const Content = importComponent(() => import('./content'));

export const Component = () => (
export const Component: FC = () => (
<>
<Headline />
<Content />
Expand Down

0 comments on commit be56286

Please sign in to comment.