Run component tests with a real store and use renderWithContext everywhere (#25217)
* Change renderWithFullContext to not mock Redux store * Remove renderWithIntl and renderWithIntlAndStore * Rename renderWithFullContext to renderWithContext * Use renderWithContext for WS context
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
ab349946db
Коммит
be34a5d2df
@@ -14,7 +14,14 @@ export type RelationOneToManyUnique<E1 extends {id: string}, E2 extends {id: str
|
||||
export type IDMappedObjects<E extends {id: string}> = RelationOneToOne<E, E>;
|
||||
|
||||
export type DeepPartial<T> = {
|
||||
[P in keyof T]?: DeepPartial<T[P]>;
|
||||
// For each field of T, make it optional and...
|
||||
[K in keyof T]?:
|
||||
// If that field is an object, make it a deep partial object
|
||||
T[K] extends object ? DeepPartial<T[K]> :
|
||||
// Else if that field is an optional object, make that a deep partial object
|
||||
T[K] extends object | undefined ? DeepPartial<T[K]> :
|
||||
// Else leave it as an optional primitive
|
||||
T[K];
|
||||
}
|
||||
|
||||
export type ValueOf<T> = T[keyof T];
|
||||
@@ -26,4 +33,4 @@ export type RequireOnlyOne<T, Keys extends keyof T = keyof T> =
|
||||
Pick<T, Exclude<keyof T, Keys>> & {[K in Keys]-?: Required<Pick<T, K>> & Partial<Record<Exclude<Keys, K>, undefined>>}[Keys];
|
||||
|
||||
export type Intersection<T1, T2> =
|
||||
Omit<Omit<T1&T2, keyof(Omit<T1, keyof(T2)>)>, keyof(Omit<T2, keyof(T1)>)>;
|
||||
Omit<Omit<T1&T2, keyof(Omit<T1, keyof(T2)>)>, keyof(Omit<T2, keyof(T1)>)>;
|
||||
|
||||
Ссылка в новой задаче
Block a user