feat(release): prepare 1.1.0 candidate
This commit is contained in:
parent
5a34f66981
commit
5205dcdfa9
736 changed files with 115667 additions and 12203 deletions
15
apps/mobile-rn/__mocks__/@react-native-documents-picker.js
Normal file
15
apps/mobile-rn/__mocks__/@react-native-documents-picker.js
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
module.exports = {
|
||||
errorCodes: {
|
||||
OPERATION_CANCELED: 'OPERATION_CANCELED',
|
||||
IN_PROGRESS: 'IN_PROGRESS',
|
||||
UNABLE_TO_OPEN_FILE_TYPE: 'UNABLE_TO_OPEN_FILE_TYPE',
|
||||
},
|
||||
isErrorWithCode: jest.fn((candidate) => (
|
||||
candidate !== null
|
||||
&& typeof candidate === 'object'
|
||||
&& typeof candidate.code === 'string'
|
||||
)),
|
||||
keepLocalCopy: jest.fn(async () => []),
|
||||
pick: jest.fn(async () => []),
|
||||
types: { audio: 'audio/*' },
|
||||
}
|
||||
44
apps/mobile-rn/__mocks__/react-native-google-mobile-ads.js
vendored
Normal file
44
apps/mobile-rn/__mocks__/react-native-google-mobile-ads.js
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
const React = require('react')
|
||||
|
||||
const adsConsentInfo = {
|
||||
status: 'NOT_REQUIRED',
|
||||
canRequestAds: true,
|
||||
privacyOptionsRequirementStatus: 'NOT_REQUIRED',
|
||||
isConsentFormAvailable: false,
|
||||
}
|
||||
|
||||
const rewardedState = {
|
||||
isLoaded: false,
|
||||
isOpened: false,
|
||||
isClicked: false,
|
||||
isClosed: false,
|
||||
isShowing: false,
|
||||
isEarnedReward: false,
|
||||
error: undefined,
|
||||
reward: undefined,
|
||||
load: jest.fn(),
|
||||
show: jest.fn(),
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
AdsConsent: {
|
||||
gatherConsent: jest.fn(async () => adsConsentInfo),
|
||||
getConsentInfo: jest.fn(async () => adsConsentInfo),
|
||||
showPrivacyOptionsForm: jest.fn(async () => adsConsentInfo),
|
||||
},
|
||||
AdsConsentPrivacyOptionsRequirementStatus: {
|
||||
UNKNOWN: 'UNKNOWN',
|
||||
REQUIRED: 'REQUIRED',
|
||||
NOT_REQUIRED: 'NOT_REQUIRED',
|
||||
},
|
||||
MaxAdContentRating: { G: 'G', PG: 'PG', T: 'T', MA: 'MA' },
|
||||
MobileAds: jest.fn(() => ({
|
||||
initialize: jest.fn(async () => []),
|
||||
setRequestConfiguration: jest.fn(async () => undefined),
|
||||
})),
|
||||
BannerAd: jest.fn(() => React.createElement(React.Fragment, null)),
|
||||
BannerAdSize: {
|
||||
ANCHORED_ADAPTIVE_BANNER: 'ANCHORED_ADAPTIVE_BANNER',
|
||||
},
|
||||
useRewardedAd: jest.fn(() => rewardedState),
|
||||
}
|
||||
29
apps/mobile-rn/__mocks__/react-native-iap.js
vendored
Normal file
29
apps/mobile-rn/__mocks__/react-native-iap.js
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
const stableUseIapResult = {
|
||||
connected: false,
|
||||
products: [],
|
||||
subscriptions: [],
|
||||
availablePurchases: [],
|
||||
activeSubscriptions: [],
|
||||
fetchProducts: jest.fn(async () => undefined),
|
||||
requestPurchase: jest.fn(async () => undefined),
|
||||
restorePurchases: jest.fn(async () => undefined),
|
||||
reconnect: jest.fn(async () => false),
|
||||
finishTransaction: jest.fn(async () => undefined),
|
||||
getAvailablePurchases: jest.fn(async () => undefined),
|
||||
getActiveSubscriptions: jest.fn(async () => []),
|
||||
hasActiveSubscriptions: jest.fn(async () => false),
|
||||
}
|
||||
|
||||
const getAvailablePurchases = jest.fn(async () => [])
|
||||
|
||||
module.exports = {
|
||||
ErrorCode: {
|
||||
UserCancelled: 'user-cancelled',
|
||||
Pending: 'pending',
|
||||
DeferredPayment: 'deferred-payment',
|
||||
},
|
||||
deepLinkToSubscriptions: jest.fn(async () => undefined),
|
||||
getAvailablePurchases,
|
||||
useIAP: jest.fn(() => stableUseIapResult),
|
||||
__stableUseIapResult: stableUseIapResult,
|
||||
}
|
||||
27
apps/mobile-rn/__mocks__/react-native-keychain.js
vendored
Normal file
27
apps/mobile-rn/__mocks__/react-native-keychain.js
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
const credentials = new Map()
|
||||
|
||||
module.exports = {
|
||||
ACCESSIBLE: {
|
||||
AFTER_FIRST_UNLOCK_THIS_DEVICE_ONLY: 'AFTER_FIRST_UNLOCK_THIS_DEVICE_ONLY',
|
||||
},
|
||||
SECURITY_LEVEL: {
|
||||
SECURE_SOFTWARE: 'SECURE_SOFTWARE',
|
||||
},
|
||||
STORAGE_TYPE: {
|
||||
AES_GCM_NO_AUTH: 'AES_GCM_NO_AUTH',
|
||||
},
|
||||
getGenericPassword: jest.fn(async ({ service } = {}) => (
|
||||
credentials.get(service ?? 'default') ?? false
|
||||
)),
|
||||
setGenericPassword: jest.fn(async (username, password, { service } = {}) => {
|
||||
const resolvedService = service ?? 'default'
|
||||
credentials.set(resolvedService, { username, password })
|
||||
return { service: resolvedService, storage: 'AES_GCM_NO_AUTH' }
|
||||
}),
|
||||
resetGenericPassword: jest.fn(async ({ service } = {}) => {
|
||||
credentials.delete(service ?? 'default')
|
||||
return true
|
||||
}),
|
||||
getAllGenericPasswordServices: jest.fn(async () => [...credentials.keys()]),
|
||||
__reset: () => credentials.clear(),
|
||||
}
|
||||
20
apps/mobile-rn/__mocks__/react-native-nitro-sound.js
vendored
Normal file
20
apps/mobile-rn/__mocks__/react-native-nitro-sound.js
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
'use strict';
|
||||
|
||||
const nativeOnly = async () => {
|
||||
throw new Error('Nitro Sound is unavailable in the Jest runtime');
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
AudioEncoderAndroidType: { AAC: 3 },
|
||||
AudioSourceAndroidType: { MIC: 1 },
|
||||
AVEncoderAudioQualityIOSType: { high: 96 },
|
||||
OutputFormatAndroidType: { MPEG_4: 2 },
|
||||
createSound: () => ({
|
||||
addRecordBackListener: () => undefined,
|
||||
pauseRecorder: nativeOnly,
|
||||
resumeRecorder: nativeOnly,
|
||||
setSubscriptionDuration: () => undefined,
|
||||
startRecorder: nativeOnly,
|
||||
stopRecorder: nativeOnly,
|
||||
}),
|
||||
};
|
||||
14
apps/mobile-rn/__mocks__/whisper-rn.js
Normal file
14
apps/mobile-rn/__mocks__/whisper-rn.js
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
const unconfigured = () => {
|
||||
throw new Error('whisper.rn test mock was invoked without an explicit transcription fixture');
|
||||
};
|
||||
|
||||
const context = {
|
||||
transcribe: jest.fn(unconfigured),
|
||||
release: jest.fn(async () => undefined),
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
initWhisper: jest.fn(async () => context),
|
||||
WhisperContext: jest.fn(),
|
||||
__mockContext: context,
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue