Real unit test (isolation, no children render)
Calls:
- constructor
- static getDerivedStateFromProps
| //Задача 1. Усовершенствуйте кэширующий декоратор | |
| function cachingDecoratorNew(func) { | |
| // Ваш код | |
| let cache = []; | |
| function wrapper(...rest) { | |
| let hash = rest.join(','); | |
| let existResult = cache.find(cacheRecord => cacheRecord.hash === hash); | |
| if (existResult) { |
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "type": "chrome", | |
| "request": "launch", | |
| "name": "chrome", | |
| "url": "http://localhost:8080", | |
| "webRoot": "${workspaceFolder}/src", | |
| // Uncomment this flag if need to set debugger points when chrome already is launched (experimental feature) |
| export type GetClientByBarcode = { | |
| success: boolean; | |
| message?: string; | |
| result?: { | |
| id: string; | |
| barcode: string; | |
| isDms: boolean; | |
| isChild: boolean; | |
| hasDebt: boolean; | |
| phone: number; |
| /* flow */ | |
| import type { | |
| ClientMisResponse, | |
| VisitsMisResponse, | |
| ServicesMisResponse, | |
| } from '../types/MISResponse'; | |
| export type MISResponse = ClientMisResponse | VisitsMisResponse | ServicesMisResponse; |