Skip to content

Commit

Permalink
Move import to URL file
Browse files Browse the repository at this point in the history
  • Loading branch information
Talha345 committed Aug 12, 2023
1 parent 1ae9ae4 commit b94b48f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
8 changes: 6 additions & 2 deletions __mocks__/react-native.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// eslint-disable-next-line no-restricted-imports
import * as ReactNative from 'react-native';
import _ from 'underscore';
import CONST from '../src/CONST';

jest.doMock('react-native', () => {
let url = 'https://new.expensify.com/';
Expand All @@ -15,7 +14,12 @@ jest.doMock('react-native', () => {
// runs against index.native.js source and so anything that is testing a component reliant on withWindowDimensions()
// would be most commonly assumed to be on a mobile phone vs. a tablet or desktop style view. This behavior can be
// overridden by explicitly setting the dimensions inside a test via Dimensions.set()
let dimensions = CONST.TESTING.SCREEN_SIZE.SMALL;
let dimensions = {
width: 300,
height: 700,
scale: 1,
fontScale: 1,
};

return Object.setPrototypeOf(
{
Expand Down
1 change: 0 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import ThemeProvider from './styles/themes/ThemeProvider';
import ThemeStylesProvider from './styles/ThemeStylesProvider';
import {CurrentReportIDContextProvider} from './components/withCurrentReportID';
import {EnvironmentProvider} from './components/withEnvironment';
import 'react-native-url-polyfill/auto';
import * as Session from './libs/actions/Session';

// For easier debugging and development, when we are in web we expose Onyx to the window, so you can more easily set data into Onyx
Expand Down
10 changes: 0 additions & 10 deletions src/CONST.js
Original file line number Diff line number Diff line change
Expand Up @@ -1308,16 +1308,6 @@ const CONST = {
INCORRECT_PASSWORD: 2,
},
},
TESTING: {
SCREEN_SIZE: {
SMALL: {
width: 300,
height: 700,
scale: 1,
fontScale: 1,
},
},
},
API_REQUEST_TYPE: {
READ: 'read',
WRITE: 'write',
Expand Down
1 change: 1 addition & 0 deletions src/libs/Url.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'react-native-url-polyfill/auto';
/**
* Add / to the end of any URL if not present
* @param {String} url
Expand Down

0 comments on commit b94b48f

Please sign in to comment.