forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unneeded test. Fix weird dependency cycle issue'
- Loading branch information
Showing
4 changed files
with
25 additions
and
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Onyx from 'react-native-onyx'; | ||
import ONYXKEYS from '@src/ONYXKEYS'; | ||
import getEnvironment from '@libs/Environment/getEnvironment'; | ||
import CONST from '@src/CONST'; | ||
|
||
function alertUser() { | ||
// For now, we will pretty much never have to do this on a platform other than production. | ||
// We should only update the minimum app version in the API after all platforms of a new version have been deployed to PRODUCTION. | ||
// As staging is always ahead of production there is no reason to "force update" those apps. | ||
getEnvironment().then((environment) => { | ||
if (environment !== CONST.ENVIRONMENT.PRODUCTION) { | ||
return; | ||
} | ||
|
||
Onyx.set(ONYXKEYS.UPDATE_REQUIRED, true); | ||
}); | ||
} | ||
|
||
export { | ||
// eslint-disable-next-line import/prefer-default-export | ||
alertUser | ||
}; |
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 |
---|---|---|
|
@@ -428,31 +428,6 @@ describe('Migrations', () => { | |
}); | ||
})); | ||
|
||
it('Should remove any instances of participants found in a report', () => | ||
Onyx.multiSet({ | ||
[`${ONYXKEYS.COLLECTION.REPORT}1`]: { | ||
reportID: 1, | ||
participants: ['[email protected]'], | ||
participantAccountIDs: [5], | ||
}, | ||
}) | ||
.then(PersonalDetailsByAccountID) | ||
.then(() => { | ||
expect(LogSpy).toHaveBeenCalledWith('[Migrate Onyx] PersonalDetailsByAccountID migration: removing participants from report 1'); | ||
const connectionID = Onyx.connect({ | ||
key: ONYXKEYS.COLLECTION.REPORT, | ||
waitForCollectionCallback: true, | ||
callback: (allReports) => { | ||
Onyx.disconnect(connectionID); | ||
const expectedReport = { | ||
reportID: 1, | ||
participantAccountIDs: [5], | ||
}; | ||
expect(allReports[`${ONYXKEYS.COLLECTION.REPORT}1`]).toMatchObject(expectedReport); | ||
}, | ||
}); | ||
})); | ||
|
||
it('Should remove any instances of ownerEmail found in a report', () => | ||
Onyx.multiSet({ | ||
[`${ONYXKEYS.COLLECTION.REPORT}1`]: { | ||
|