fix: remove unnecessary abort opportunity
This commit is contained in:
parent
afdd2d3e6a
commit
586bc0aee2
|
@ -43,10 +43,6 @@ export async function checkForUpdates (db, dataSource, signal) {
|
|||
}
|
||||
|
||||
export async function loadDataForFirstTime (db, dataSource, signal) {
|
||||
/* istanbul ignore else */
|
||||
if (import.meta.env.MODE === 'test') {
|
||||
await abortOpportunity() // the fetch will error if the signal is aborted
|
||||
}
|
||||
let [eTag, emojiData] = await getETagAndData(dataSource, signal)
|
||||
|
||||
if (!eTag) {
|
||||
|
|
|
@ -68,17 +68,17 @@ describe('database timing tests', () => {
|
|||
{
|
||||
testName: 'basic',
|
||||
dataSource: ALL_EMOJI,
|
||||
maxExpectedAbortOpportunityCount: secondLoad ? (dataChanged ? 6 : 5) : 5
|
||||
maxExpectedAbortOpportunityCount: secondLoad ? (dataChanged ? 6 : 5) : 4
|
||||
},
|
||||
{
|
||||
testName: 'misconfigured etag',
|
||||
dataSource: ALL_EMOJI_MISCONFIGURED_ETAG,
|
||||
maxExpectedAbortOpportunityCount: secondLoad ? 5 : 5
|
||||
maxExpectedAbortOpportunityCount: secondLoad ? 5 : 4
|
||||
},
|
||||
{
|
||||
testName: 'no etag',
|
||||
dataSource: ALL_EMOJI_NO_ETAG,
|
||||
maxExpectedAbortOpportunityCount: secondLoad ? 6 : 6
|
||||
maxExpectedAbortOpportunityCount: secondLoad ? 6 : 5
|
||||
}
|
||||
]
|
||||
scenarios.forEach(({ testName, dataSource, maxExpectedAbortOpportunityCount }) => {
|
||||
|
|
Loading…
Reference in New Issue