-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Merge branch 'master' into likhith/79242/fix-broken-manual-upl…
…oad-flow
- Loading branch information
Showing
1,056 changed files
with
33,469 additions
and
26,582 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx lint-staged --allow-empty | ||
npx lint-staged --allow-empty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
declare module '@binary-com/binary-document-uploader'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
32 changes: 0 additions & 32 deletions
32
packages/account/src/Components/Routes/__tests__/route-with-sub-routes.spec.js
This file was deleted.
Oops, something went wrong.
34 changes: 22 additions & 12 deletions
34
...s/__tests__/route-with-sub-routes.spec.js → .../__tests__/route-with-sub-routes.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,42 @@ | ||
import React from 'react'; | ||
import { expect } from 'chai'; | ||
import { configure, shallow } from 'enzyme'; | ||
import Adapter from 'enzyme-adapter-react-16'; | ||
import { render, screen } from '@testing-library/react'; | ||
import { RouteWithSubRoutesRender } from '../route-with-sub-routes'; | ||
import { Redirect } from 'react-router-dom'; | ||
import { PlatformContext } from '@deriv/shared'; | ||
|
||
configure({ adapter: new Adapter() }); | ||
jest.mock('react-router-dom', () => ({ | ||
...jest.requireActual('react-router-dom'), | ||
Route: jest.fn(({ exact, path }) => ( | ||
<div> | ||
<span> | ||
Route loaded {String(exact)} {path}` | ||
</span> | ||
</div> | ||
)), | ||
})); | ||
|
||
afterEach(() => { | ||
jest.clearAllMocks(); | ||
}); | ||
|
||
describe('<RouteWithSubRoutes />', () => { | ||
it('should render one <RouteWithSubRoutesRender /> component', () => { | ||
const comp = ( | ||
render( | ||
<PlatformContext.Provider> | ||
<RouteWithSubRoutesRender /> | ||
</PlatformContext.Provider> | ||
); | ||
const wrapper = shallow(comp); | ||
expect(wrapper).to.have.length(1); | ||
|
||
expect(screen.getByText(/Route loaded/)).toBeInTheDocument(); | ||
}); | ||
|
||
it('should have props as passed as route', () => { | ||
const route = { path: '/', component: Redirect, title: '', exact: true, to: '/root' }; | ||
const comp = ( | ||
const route = { path: '/test', component: Redirect, title: '', exact: true, to: '/root' }; | ||
render( | ||
<PlatformContext.Provider> | ||
<RouteWithSubRoutesRender {...route} /> | ||
</PlatformContext.Provider> | ||
); | ||
const wrapper = shallow(comp); | ||
expect(wrapper.prop('exact')).to.equal(true); | ||
expect(wrapper.prop('path')).to.equal('/'); | ||
expect(screen.getByText(/route loaded true \/test/i)).toBeInTheDocument(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.