Skip to content

Commit

Permalink
mock react-markdown in application detail SyntaxError: Unexpected tok…
Browse files Browse the repository at this point in the history
…en 'export'

https://app.circleci.com/pipelines/github/ademidun/atila-client-web-app/1772/workflows/ff5de33e-07e3-416b-af65-d01c488818b2/jobs/3343

see: remarkjs/react-markdown#635 (comment)

Details:

    /home/circleci/repository/node_modules/react-markdown/index.js:6
    export {uriTransformer} from './lib/uri-transformer.js'
    ^^^^^^

    SyntaxError: Unexpected token 'export'

      1 | import React from 'react'
    > 2 | import ReactMarkdown from 'react-markdown';
  • Loading branch information
ademidun committed Jan 18, 2022
1 parent 1f367fe commit 6430bd8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/scenes/Application/ApplicationDetail.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ const mockStore = configureStore();
const guestUserStore = mockStore(initialReduxState);
const loggedInStore = mockStore(initialReduxStateLoggedIn);

jest.mock("react-markdown", () => (props) => {
return <>{props.children}</>
})
let mockApi = new MockAPI();
mockApi.initializeMocks();
describe('<ApplicationDetail />', () => {
Expand Down

0 comments on commit 6430bd8

Please sign in to comment.