{"id":473219,"date":"2025-09-02T15:50:40","date_gmt":"2025-09-02T15:50:40","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=473219"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=473219","title":{"rendered":"<span>Unit \u0442\u0435\u0441\u0442\u044b \u0432 React \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>1. \u0417\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u043d\u044b unit-\u0442\u0435\u0441\u0442\u044b?<\/h3>\n<p>Unit-\u0442\u0435\u0441\u0442\u044b \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 <strong>\u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u043a\u043e\u0434\u0430<\/strong> \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0443\u0442\u0438\u043b\u0438\u0442. \u0418\u0445 \u0437\u0430\u0434\u0430\u0447\u0430 \u2014 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 <strong>\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0432 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445<\/strong>.<\/p>\n<p>\u041d\u043e \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434 \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u043e\u0433\u0438\u043a\u0430, \u043d\u043e \u0438:<\/p>\n<ul>\n<li>\n<p><strong>UI-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b<\/strong> (\u043a\u043d\u043e\u043f\u043a\u0438, \u0444\u043e\u0440\u043c\u044b, \u0441\u043f\u0438\u0441\u043a\u0438)<\/p>\n<\/li>\n<li>\n<p><strong>API-\u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f<\/strong> (\u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0442\u0432\u0435\u0442\u043e\u0432)<\/p>\n<\/li>\n<li>\n<p><strong>\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435<\/strong> (Redux, MobX, Context)<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438<\/strong> (\u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430, \u043f\u043b\u0430\u0442\u0435\u0436\u0438)<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u0432\u0441\u0451 \u044d\u0442\u043e \u043f\u043e\u043a\u0440\u044b\u0442\u044c unit-\u0442\u0435\u0441\u0442\u0430\u043c\u0438? <strong>\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u2014 \u0434\u0430, \u043d\u043e \u043d\u0443\u0436\u043d\u043e \u043b\u0438?<\/strong><\/p>\n<h3>2. \u0427\u0442\u043e \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 unit-\u0442\u0435\u0441\u0442\u0430\u0445?<\/h3>\n<h4>\u274c UI-\u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 (\u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b)<\/h4>\n<p><strong>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430:<\/strong><\/p>\n<ul>\n<li>\n<p>\u041f\u0430\u0434\u0430\u044e\u0442 \u043f\u0440\u0438 \u043b\u044e\u0431\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0432\u0451\u0440\u0441\u0442\u043a\u0438, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043b\u043e\u0433\u0438\u043a\u0430 \u043d\u0435 \u0441\u043b\u043e\u043c\u0430\u043d\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0422\u0440\u0435\u0431\u0443\u044e\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u0430\u043b\u043e\u043d\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435 \u043b\u043e\u0432\u044f\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0431\u0430\u0433\u0438, \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"javascript\">it('renders button', () =&gt; {   render(&lt;Button \/&gt;);   expect(screen.getByRole('button')).toBeInTheDocument(); });<\/code><\/pre>\n<p><strong>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e?<\/strong><\/p>\n<ul>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <strong>Storybook<\/strong> \u0434\u043b\u044f \u0440\u0443\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0438\u0441\u0430\u0442\u044c <strong>\u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b<\/strong>, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u0430\u044f \u0444\u043e\u0440\u043c\u0430) \u2014 <strong>\u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/strong><\/p>\n<\/li>\n<\/ul>\n<h4>\u274c API-\u0437\u0430\u043f\u0440\u043e\u0441\u044b (\u0441 \u043c\u043e\u043a\u0430\u043c\u0438)<\/h4>\n<p><strong>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430:<\/strong><\/p>\n<ul>\n<li>\n<p>\u041c\u043e\u043a\u0438 \u043d\u0435 \u043e\u0442\u0440\u0430\u0436\u0430\u044e\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 API.<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u0441\u0442\u044b \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442, \u043d\u043e \u043d\u0430 \u0431\u043e\u0435\u0432\u043e\u043c API \u0432\u0441\u0451 \u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438: \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 API \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u043c\u043e\u043a\u0438.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"javascript\">\/\/ \u0425\u0440\u0443\u043f\u043a\u0438\u0439 \u0442\u0435\u0441\u0442 it('loads user data', async () =&gt; {   axios.get.mockResolvedValue({ data: { name: 'John' } });      const { result } = renderHook(() =&gt; useUser());   await waitFor(() =&gt; {     expect(result.current.user.name).toBe('John');   }); });<\/code><\/pre>\n<p><strong>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e?<\/strong><\/p>\n<ul>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <strong>Zod<\/strong> \u0434\u043b\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 API.<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432 <strong>\u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445\/E2E-\u0442\u0435\u0441\u0442\u0430\u0445<\/strong> (Cypress).<\/p>\n<\/li>\n<\/ul>\n<h4>\u274c \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432<\/h4>\n<p><strong>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u0442\u0435 \u043d\u0435 \u0441\u0432\u043e\u0439 \u043a\u043e\u0434, \u0430 \u0447\u0443\u0436\u043e\u0439 (React, Redux, lodash)..<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"javascript\">\/\/ \u0411\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u0442\u0435\u0441\u0442 - \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 lodash it('should add numbers', () =&gt; {   expect(add(2, 2)).toBe(4); });<\/code><\/pre>\n<p><strong>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c?<\/strong><\/p>\n<ul>\n<li>\n<p>\u0414\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0442\u0435\u0441\u0442\u0430\u043c \u0441\u0430\u043c\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u043e\u0431\u0451\u0440\u0442\u043a\u0438 \u2014 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u043e\u044e \u043b\u043e\u0433\u0438\u043a\u0443.<\/p>\n<\/li>\n<\/ul>\n<h3>3. \u0427\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 unit-\u0442\u0435\u0441\u0442\u0430\u0445?<\/h3>\n<h4>\u2705 \u0423\u0442\u0438\u043b\u0438\u0442\u044b \u0438 \u0447\u0438\u0441\u0442\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/h4>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435:<\/p>\n<ul>\n<li>\n<p>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 (<code><strong>formatDate<\/strong><\/code>, <code><strong>parseQueryString<\/strong><\/code>).<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0443 (<code><strong>calculateDiscount<\/strong><\/code>, <code><strong>validatePassword<\/strong><\/code>).<\/p>\n<\/li>\n<li>\n<p>\u041b\u0435\u0433\u043a\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f <strong>\u0431\u0435\u0437 \u043c\u043e\u043a\u043e\u0432 \u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430<\/strong>.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"javascript\">\/\/ utils\/validatePassword.js export function validatePassword(password) {   return password.length &gt;= 8 &amp;&amp;           \/[A-Z]\/.test(password) &amp;&amp;           \/[0-9]\/.test(password); }  \/\/ utils\/validatePassword.test.js import { validatePassword } from '.\/validatePassword';  describe('validatePassword', () =&gt; {   it('returns true for valid passwords', () =&gt; {     expect(validatePassword('ValidPass123')).toBe(true);   });    it('returns false for invalid passwords', () =&gt; {     expect(validatePassword('short')).toBe(false);     expect(validatePassword('nouppercase123')).toBe(false);     expect(validatePassword('NoNumbersHere')).toBe(false);   }); });<\/code><\/pre>\n<h4>\u2705 \u041a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u0445\u0443\u043a\u0438<\/h4>\n<p>\u0425\u0443\u043a\u0438 \u0441 \u043b\u043e\u0433\u0438\u043a\u043e\u0439 (\u0444\u043e\u0440\u043c\u0430\u043c\u0438, \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c, API-\u0432\u044b\u0437\u043e\u0432\u0430\u043c\u0438) \u2014 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0435 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u044b \u0434\u043b\u044f unit-\u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<pre><code class=\"javascript\">\/\/ hooks\/useCounter.js import { useState } from 'react';  export function useCounter(initialValue = 0) {   const [count, setCount] = useState(initialValue);    const increment = () =&gt; setCount(c =&gt; c + 1);   const decrement = () =&gt; setCount(c =&gt; c - 1);   const reset = () =&gt; setCount(initialValue);    return { count, increment, decrement, reset }; }  \/\/ hooks\/useCounter.test.js import { renderHook, act } from '@testing-library\/react-hooks'; import { useCounter } from '.\/useCounter';  describe('useCounter', () =&gt; {   it('should increment counter', () =&gt; {     const { result } = renderHook(() =&gt; useCounter());      act(() =&gt; result.current.increment());     expect(result.current.count).toBe(1);   });    it('should reset counter', () =&gt; {     const { result } = renderHook(() =&gt; useCounter(5));          act(() =&gt; result.current.increment());     act(() =&gt; result.current.reset());     expect(result.current.count).toBe(5);   }); });<\/code><\/pre>\n<h4>\u2705 \u0421\u043b\u043e\u0436\u043d\u0430\u044f \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0430<\/h4>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435 \u0435\u0441\u0442\u044c \u043d\u0435\u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u2014 \u0438\u0445 \u0441\u0442\u043e\u0438\u0442 \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<pre><code class=\"javascript\">\/\/ cartUtils.js export function calculateTotal(items, discount = 0) {   const subtotal = items.reduce((sum, item) =&gt; sum + item.price * item.quantity, 0);   const discountAmount = subtotal * (discount \/ 100);   return subtotal - discountAmount; }  \/\/ cartUtils.test.js import { calculateTotal } from '.\/cartUtils';  describe('calculateTotal', () =&gt; {   it('calculates total without discount', () =&gt; {     const items = [       { price: 10, quantity: 2 },       { price: 5, quantity: 3 }     ];     expect(calculateTotal(items)).toBe(35);   });    it('applies discount correctly', () =&gt; {     const items = [       { price: 20, quantity: 1 },       { price: 10, quantity: 2 }     ];     expect(calculateTotal(items, 10)).toBe(36); \/\/ 40 - 10%   });    it('handles empty cart', () =&gt; {     expect(calculateTotal([])).toBe(0);   }); });<\/code><\/pre>\n<h3>4. \u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b unit-\u0442\u0435\u0441\u0442\u0430\u043c<\/h3>\n<p><strong>\u041b\u043e\u0433\u0438\u043a\u0430, \u0443\u0442\u0438\u043b\u0438\u0442\u044b<\/strong> Unit-\u0442\u0435\u0441\u0442\u044b (Jest, Vitest)<\/p>\n<p><strong>API-\u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f<\/strong> \u041a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b (Zod)<\/p>\n<p><strong>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432<\/strong> \u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b<\/p>\n<h3>5. \u041e\u0442 \u0431\u043e\u043b\u0438 \u043a \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0443: \u044d\u0432\u043e\u043b\u044e\u0446\u0438\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435.<\/h3>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u0431\u044b\u043b \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0438 \u0434\u0430\u0432\u043d\u043e \u0436\u0438\u0432\u0443\u0449\u0438\u043c. \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u043e \u0432\u043e\u0432\u0441\u0435, \u0430 \u043f\u0435\u0440\u0432\u044b\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u0445\u0430\u043e\u0442\u0438\u0447\u043d\u044b\u043c\u0438 \u0438 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u043c\u0438. \u041a\u0430\u0436\u0434\u044b\u0439 \u043d\u043e\u0432\u044b\u0439 \u0442\u0435\u0441\u0442 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435\u043c \u2014 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u044f\u043c\u0438 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0438\u0441\u043a\u0430\u0442\u044c \u0431\u0430\u043b\u0430\u043d\u0441 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u043b\u0430\u0441\u044c \u0432 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435, \u043c\u044b \u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043d\u0435 \u043d\u0430 \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0430 \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f. \u041f\u0435\u0440\u0432\u044b\u0435 \u0442\u0435\u0441\u0442\u044b, \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432, \u0442\u0430\u043a \u043a\u0430\u043a \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f, \u043d\u043e \u044d\u0442\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b\u043e\u0441\u044c \u0432 \u0433\u043e\u043b\u043e\u0432\u043d\u0443\u044e \u0431\u043e\u043b\u044c. \u041f\u0440\u043e\u0441\u0442\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u043e\u0432 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0435\u043d\u0430\u0434\u0435\u0436\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u2014 \u043b\u044e\u0431\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0438\u043b\u0435\u0439 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043b\u0438 \u043a \u043e\u0448\u0438\u0431\u043a\u0430\u043c \u0442\u0435\u0441\u0442\u0430, \u0445\u043e\u0442\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0430\u0441\u044c \u0440\u0430\u0431\u043e\u0447\u0435\u0439, \u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0438\u043b\u0438 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u043c\u0438 \u0438 \u0432\u0445\u043e\u0434\u0438\u043b\u0438 \u0432 \u043d\u043e\u0440\u043c\u0443. \u041c\u044b \u043f\u043e\u043d\u044f\u043b\u0438, \u0447\u0442\u043e \u0442\u0430\u043a\u0438\u0435 \u0442\u0435\u0441\u0442\u044b \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b \u0438 \u043b\u0443\u0447\u0448\u0435 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0430 \u043d\u0435 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0432\u0438\u0434\u0430. \u041f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u043e\u0442\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043e\u0442 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432, \u043f\u043e\u043b\u043e\u0436\u0438\u0432\u0448\u0438\u0441\u044c \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 \u0438 \u0435\u0433\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<p><strong>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 API.<\/strong> \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0441 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435\u043c API-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u043a\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u0432\u0435\u043b\u043e \u043a \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044e \u0445\u0440\u0443\u043f\u043a\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u2014 \u043c\u044b \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043c\u043e\u043a\u0438 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0442\u0435\u0441\u0442\u044b \u043c\u044b \u043f\u0438\u0441\u0430\u043b\u0438 \u0432 \u043f\u0440\u0435\u0434\u0434\u0432\u0435\u0440\u044c\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0430\u043f\u0438, \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e. \u0427\u0442\u043e\u0431\u044b \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u0441 \u044d\u0442\u0438\u043c\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438, \u043c\u044b \u043d\u0430\u0447\u0430\u043b\u0438 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0432\u043d\u0435\u0434\u0440\u044f\u0442\u044c Zod \u0438 \u0432\u0432\u0435\u043b\u0438 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u0443\u044e \u0440\u0443\u0447\u043d\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u043f\u0435\u0440\u0435\u0434 \u043a\u0430\u0436\u0434\u044b\u043c \u0440\u0435\u043b\u0438\u0437\u043e\u043c. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u0448\u0435\u043b \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0438 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0435\u0435.<\/p>\n<p> \u041d\u0443 \u0438 \u043b\u0438\u0447\u043d\u0430\u044f \u0433\u043e\u043b\u043e\u0432\u043d\u0430\u044f \u0431\u043e\u043b\u044c, \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435 \u0442\u0435\u0441\u0442\u0430\u043c\u0438 \u0446\u0435\u043b\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u2014 \u0441\u0430\u043c\u043e\u0435 \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 \u0437\u0430\u043d\u044f\u0442\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u043b\u0438\u0431\u043e \u044d\u0442\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043b\u043e\u0433\u0438\u043a\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0443\u0442\u0438\u043b\u0438\u0442, \u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 API, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b Zod.<\/p>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435\u0433\u043e \u043d\u0430 20-30 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043e\u0432 unit \u0442\u0435\u0441\u0442\u0430\u043c\u0438, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c Zod \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0441 API, unit \u0442\u0435\u0441\u0442\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0443 \u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u044b, \u0430 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0437\u0430 \u0441\u0447\u0435\u0442 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u0438 \u0440\u0443\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0435\u0440\u0435\u0434 \u0440\u0435\u043b\u0438\u0437\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u0447\u0430\u0441\u0430.<\/p>\n<h3>\u0412\u044b\u0432\u043e\u0434<\/h3>\n<ul>\n<li>\n<p><strong>Unit-\u0442\u0435\u0441\u0442\u044b \u043d\u0443\u0436\u043d\u044b<\/strong> \u0434\u043b\u044f \u043b\u043e\u0433\u0438\u043a\u0438, \u0443\u0442\u0438\u043b\u0438\u0442 \u0438 \u0445\u0443\u043a\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0435 \u043d\u0443\u0436\u043d\u044b<\/strong> \u0434\u043b\u044f UI-\u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430, API (\u0441 \u043c\u043e\u043a\u0430\u043c\u0438) \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.<\/p>\n<\/li>\n<li>\n<p><strong>\u041b\u0443\u0447\u0448\u0435 \u043c\u0435\u043d\u044c\u0448\u0435, \u043d\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0435\u0435<\/strong> \u2014 \u0442\u0435\u0441\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b <strong>\u043b\u043e\u0432\u0438\u0442\u044c \u0431\u0430\u0433\u0438<\/strong>, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u044b\u0442\u044c.<\/p>\n<\/li>\n<li>\n<p><strong>\u0414\u043e\u043f\u043e\u043b\u043d\u044f\u0439\u0442\u0435 unit-\u0442\u0435\u0441\u0442\u044b<\/strong> \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c\u0438 \u0438 E2E-\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u043c\u0438.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0422\u0435\u0441\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f, \u0430 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043b\u0438\u0448\u043d\u044e\u044e \u0440\u0430\u0431\u043e\u0442\u0443.<\/strong> \ud83d\ude80<\/p>\n<p><strong>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438:<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/t.me\/frontend_nomagic\" rel=\"noopener noreferrer nofollow\">Telegram<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.youtube.com\/channel\/UCr6T-E-joYofGHgdq-eMkqA\" rel=\"noopener noreferrer nofollow\">YouTube<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/935742\/\"> https:\/\/habr.com\/ru\/articles\/935742\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>1. \u0417\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u043d\u044b unit-\u0442\u0435\u0441\u0442\u044b?<\/h3>\n<p>Unit-\u0442\u0435\u0441\u0442\u044b \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 <strong>\u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u043a\u043e\u0434\u0430<\/strong> \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0443\u0442\u0438\u043b\u0438\u0442. \u0418\u0445 \u0437\u0430\u0434\u0430\u0447\u0430 \u2014 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 <strong>\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0432 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445<\/strong>.<\/p>\n<p>\u041d\u043e \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434 \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u043e\u0433\u0438\u043a\u0430, \u043d\u043e \u0438:<\/p>\n<ul>\n<li>\n<p><strong>UI-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b<\/strong> (\u043a\u043d\u043e\u043f\u043a\u0438, \u0444\u043e\u0440\u043c\u044b, \u0441\u043f\u0438\u0441\u043a\u0438)<\/p>\n<\/li>\n<li>\n<p><strong>API-\u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f<\/strong> (\u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0442\u0432\u0435\u0442\u043e\u0432)<\/p>\n<\/li>\n<li>\n<p><strong>\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435<\/strong> (Redux, MobX, Context)<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438<\/strong> (\u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430, \u043f\u043b\u0430\u0442\u0435\u0436\u0438)<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u0432\u0441\u0451 \u044d\u0442\u043e \u043f\u043e\u043a\u0440\u044b\u0442\u044c unit-\u0442\u0435\u0441\u0442\u0430\u043c\u0438? <strong>\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u2014 \u0434\u0430, \u043d\u043e \u043d\u0443\u0436\u043d\u043e \u043b\u0438?<\/strong><\/p>\n<h3>2. \u0427\u0442\u043e \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 unit-\u0442\u0435\u0441\u0442\u0430\u0445?<\/h3>\n<h4>\u274c UI-\u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 (\u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b)<\/h4>\n<p><strong>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430:<\/strong><\/p>\n<ul>\n<li>\n<p>\u041f\u0430\u0434\u0430\u044e\u0442 \u043f\u0440\u0438 \u043b\u044e\u0431\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0432\u0451\u0440\u0441\u0442\u043a\u0438, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043b\u043e\u0433\u0438\u043a\u0430 \u043d\u0435 \u0441\u043b\u043e\u043c\u0430\u043d\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0422\u0440\u0435\u0431\u0443\u044e\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u0430\u043b\u043e\u043d\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435 \u043b\u043e\u0432\u044f\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0431\u0430\u0433\u0438, \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"javascript\">it('renders button', () =&gt; {   render(&lt;Button \/&gt;);   expect(screen.getByRole('button')).toBeInTheDocument(); });<\/code><\/pre>\n<p><strong>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e?<\/strong><\/p>\n<ul>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <strong>Storybook<\/strong> \u0434\u043b\u044f \u0440\u0443\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0438\u0441\u0430\u0442\u044c <strong>\u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b<\/strong>, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u0430\u044f \u0444\u043e\u0440\u043c\u0430) \u2014 <strong>\u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/strong><\/p>\n<\/li>\n<\/ul>\n<h4>\u274c API-\u0437\u0430\u043f\u0440\u043e\u0441\u044b (\u0441 \u043c\u043e\u043a\u0430\u043c\u0438)<\/h4>\n<p><strong>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430:<\/strong><\/p>\n<ul>\n<li>\n<p>\u041c\u043e\u043a\u0438 \u043d\u0435 \u043e\u0442\u0440\u0430\u0436\u0430\u044e\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 API.<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u0441\u0442\u044b \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442, \u043d\u043e \u043d\u0430 \u0431\u043e\u0435\u0432\u043e\u043c API \u0432\u0441\u0451 \u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438: \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 API \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u043c\u043e\u043a\u0438.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"javascript\">\/\/ \u0425\u0440\u0443\u043f\u043a\u0438\u0439 \u0442\u0435\u0441\u0442 it('loads user data', async () =&gt; {   axios.get.mockResolvedValue({ data: { name: 'John' } });      const { result } = renderHook(() =&gt; useUser());   await waitFor(() =&gt; {     expect(result.current.user.name).toBe('John');   }); });<\/code><\/pre>\n<p><strong>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e?<\/strong><\/p>\n<ul>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <strong>Zod<\/strong> \u0434\u043b\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 API.<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432 <strong>\u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445\/E2E-\u0442\u0435\u0441\u0442\u0430\u0445<\/strong> (Cypress).<\/p>\n<\/li>\n<\/ul>\n<h4>\u274c \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432<\/h4>\n<p><strong>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u0442\u0435 \u043d\u0435 \u0441\u0432\u043e\u0439 \u043a\u043e\u0434, \u0430 \u0447\u0443\u0436\u043e\u0439 (React, Redux, lodash)..<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"javascript\">\/\/ \u0411\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u0442\u0435\u0441\u0442 - \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 lodash it('should add numbers', () =&gt; {   expect(add(2, 2)).toBe(4); });<\/code><\/pre>\n<p><strong>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c?<\/strong><\/p>\n<ul>\n<li>\n<p>\u0414\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0442\u0435\u0441\u0442\u0430\u043c \u0441\u0430\u043c\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u043e\u0431\u0451\u0440\u0442\u043a\u0438 \u2014 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u043e\u044e \u043b\u043e\u0433\u0438\u043a\u0443.<\/p>\n<\/li>\n<\/ul>\n<h3>3. \u0427\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 unit-\u0442\u0435\u0441\u0442\u0430\u0445?<\/h3>\n<h4>\u2705 \u0423\u0442\u0438\u043b\u0438\u0442\u044b \u0438 \u0447\u0438\u0441\u0442\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/h4>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435:<\/p>\n<ul>\n<li>\n<p>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 (<code><strong>formatDate<\/strong><\/code>, <code><strong>parseQueryString<\/strong><\/code>).<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0443 (<code><strong>calculateDiscount<\/strong><\/code>, <code><strong>validatePassword<\/strong><\/code>).<\/p>\n<\/li>\n<li>\n<p>\u041b\u0435\u0433\u043a\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f <strong>\u0431\u0435\u0437 \u043c\u043e\u043a\u043e\u0432 \u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430<\/strong>.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"javascript\">\/\/ utils\/validatePassword.js export function validatePassword(password) {   return password.length &gt;= 8 &amp;&amp;           \/[A-Z]\/.test(password) &amp;&amp;           \/[0-9]\/.test(password); }  \/\/ utils\/validatePassword.test.js import { validatePassword } from '.\/validatePassword';  describe('validatePassword', () =&gt; {   it('returns true for valid passwords', () =&gt; {     expect(validatePassword('ValidPass123')).toBe(true);   });    it('returns false for invalid passwords', () =&gt; {     expect(validatePassword('short')).toBe(false);     expect(validatePassword('nouppercase123')).toBe(false);     expect(validatePassword('NoNumbersHere')).toBe(false);   }); });<\/code><\/pre>\n<h4>\u2705 \u041a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u0445\u0443\u043a\u0438<\/h4>\n<p>\u0425\u0443\u043a\u0438 \u0441 \u043b\u043e\u0433\u0438\u043a\u043e\u0439 (\u0444\u043e\u0440\u043c\u0430\u043c\u0438, \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c, API-\u0432\u044b\u0437\u043e\u0432\u0430\u043c\u0438) \u2014 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0435 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u044b \u0434\u043b\u044f unit-\u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<pre><code class=\"javascript\">\/\/ hooks\/useCounter.js import { useState } from 'react';  export function useCounter(initialValue = 0) {   const [count, setCount] = useState(initialValue);    const increment = () =&gt; setCount(c =&gt; c + 1);   const decrement = () =&gt; setCount(c =&gt; c - 1);   const reset = () =&gt; setCount(initialValue);    return { count, increment, decrement, reset }; }  \/\/ hooks\/useCounter.test.js import { renderHook, act } from '@testing-library\/react-hooks'; import { useCounter } from '.\/useCounter';  describe('useCounter', () =&gt; {   it('should increment counter', () =&gt; {     const { result } = renderHook(() =&gt; useCounter());      act(() =&gt; result.current.increment());     expect(result.current.count).toBe(1);   });    it('should reset counter', () =&gt; {     const { result } = renderHook(() =&gt; useCounter(5));          act(() =&gt; result.current.increment());     act(() =&gt; result.current.reset());     expect(result.current.count).toBe(5);   }); });<\/code><\/pre>\n<h4>\u2705 \u0421\u043b\u043e\u0436\u043d\u0430\u044f \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0430<\/h4>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435 \u0435\u0441\u0442\u044c \u043d\u0435\u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u2014 \u0438\u0445 \u0441\u0442\u043e\u0438\u0442 \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<pre><code class=\"javascript\">\/\/ cartUtils.js export function calculateTotal(items, discount = 0) {   const subtotal = items.reduce((sum, item) =&gt; sum + item.price * item.quantity, 0);   const discountAmount = subtotal * (discount \/ 100);   return subtotal - discountAmount; }  \/\/ cartUtils.test.js import { calculateTotal } from '.\/cartUtils';  describe('calculateTotal', () =&gt; {   it('calculates total without discount', () =&gt; {     const items = [       { price: 10, quantity: 2 },       { price: 5, quantity: 3 }     ];     expect(calculateTotal(items)).toBe(35);   });    it('applies discount correctly', () =&gt; {     const items = [       { price: 20, quantity: 1 },       { price: 10, quantity: 2 }     ];     expect(calculateTotal(items, 10)).toBe(36); \/\/ 40 - 10%   });    it('handles empty cart', () =&gt; {     expect(calculateTotal([])).toBe(0);   }); });<\/code><\/pre>\n<h3>4. \u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b unit-\u0442\u0435\u0441\u0442\u0430\u043c<\/h3>\n<p><strong>\u041b\u043e\u0433\u0438\u043a\u0430, \u0443\u0442\u0438\u043b\u0438\u0442\u044b<\/strong> Unit-\u0442\u0435\u0441\u0442\u044b (Jest, Vitest)<\/p>\n<p><strong>API-\u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f<\/strong> \u041a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b (Zod)<\/p>\n<p><strong>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432<\/strong> \u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b<\/p>\n<h3>5. \u041e\u0442 \u0431\u043e\u043b\u0438 \u043a \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0443: \u044d\u0432\u043e\u043b\u044e\u0446\u0438\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435.<\/h3>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u0431\u044b\u043b \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0438 \u0434\u0430\u0432\u043d\u043e \u0436\u0438\u0432\u0443\u0449\u0438\u043c. \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u043e \u0432\u043e\u0432\u0441\u0435, \u0430 \u043f\u0435\u0440\u0432\u044b\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u0445\u0430\u043e\u0442\u0438\u0447\u043d\u044b\u043c\u0438 \u0438 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u043c\u0438. \u041a\u0430\u0436\u0434\u044b\u0439 \u043d\u043e\u0432\u044b\u0439 \u0442\u0435\u0441\u0442 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435\u043c \u2014 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u044f\u043c\u0438 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0438\u0441\u043a\u0430\u0442\u044c \u0431\u0430\u043b\u0430\u043d\u0441 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u043b\u0430\u0441\u044c \u0432 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435, \u043c\u044b \u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043d\u0435 \u043d\u0430 \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0430 \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f. \u041f\u0435\u0440\u0432\u044b\u0435 \u0442\u0435\u0441\u0442\u044b, \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432, \u0442\u0430\u043a \u043a\u0430\u043a \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f, \u043d\u043e \u044d\u0442\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b\u043e\u0441\u044c \u0432 \u0433\u043e\u043b\u043e\u0432\u043d\u0443\u044e \u0431\u043e\u043b\u044c. \u041f\u0440\u043e\u0441\u0442\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u043e\u0432 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0435\u043d\u0430\u0434\u0435\u0436\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u2014 \u043b\u044e\u0431\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0438\u043b\u0435\u0439 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043b\u0438 \u043a \u043e\u0448\u0438\u0431\u043a\u0430\u043c \u0442\u0435\u0441\u0442\u0430, \u0445\u043e\u0442\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0430\u0441\u044c \u0440\u0430\u0431\u043e\u0447\u0435\u0439, \u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0438\u043b\u0438 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u043c\u0438 \u0438 \u0432\u0445\u043e\u0434\u0438\u043b\u0438 \u0432 \u043d\u043e\u0440\u043c\u0443. \u041c\u044b \u043f\u043e\u043d\u044f\u043b\u0438, \u0447\u0442\u043e \u0442\u0430\u043a\u0438\u0435 \u0442\u0435\u0441\u0442\u044b \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b \u0438 \u043b\u0443\u0447\u0448\u0435 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0430 \u043d\u0435 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0432\u0438\u0434\u0430. \u041f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u043e\u0442\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043e\u0442 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432, \u043f\u043e\u043b\u043e\u0436\u0438\u0432\u0448\u0438\u0441\u044c \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 \u0438 \u0435\u0433\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<p><strong>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 API.<\/strong> \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0441 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435\u043c API-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u043a\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u0432\u0435\u043b\u043e \u043a \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044e \u0445\u0440\u0443\u043f\u043a\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u2014 \u043c\u044b \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043c\u043e\u043a\u0438 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0442\u0435\u0441\u0442\u044b \u043c\u044b \u043f\u0438\u0441\u0430\u043b\u0438 \u0432 \u043f\u0440\u0435\u0434\u0434\u0432\u0435\u0440\u044c\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0430\u043f\u0438, \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e. \u0427\u0442\u043e\u0431\u044b \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u0441 \u044d\u0442\u0438\u043c\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438, \u043c\u044b \u043d\u0430\u0447\u0430\u043b\u0438 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0432\u043d\u0435\u0434\u0440\u044f\u0442\u044c Zod \u0438 \u0432\u0432\u0435\u043b\u0438 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u0443\u044e \u0440\u0443\u0447\u043d\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u043f\u0435\u0440\u0435\u0434 \u043a\u0430\u0436\u0434\u044b\u043c \u0440\u0435\u043b\u0438\u0437\u043e\u043c. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u0448\u0435\u043b \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0438 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0435\u0435.<\/p>\n<p> \u041d\u0443 \u0438 \u043b\u0438\u0447\u043d\u0430\u044f \u0433\u043e\u043b\u043e\u0432\u043d\u0430\u044f \u0431\u043e\u043b\u044c, \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435 \u0442\u0435\u0441\u0442\u0430\u043c\u0438 \u0446\u0435\u043b\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u2014 \u0441\u0430\u043c\u043e\u0435 \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 \u0437\u0430\u043d\u044f\u0442\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u043b\u0438\u0431\u043e \u044d\u0442\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043b\u043e\u0433\u0438\u043a\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0443\u0442\u0438\u043b\u0438\u0442, \u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 API, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b Zod.<\/p>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435\u0433\u043e \u043d\u0430 20-30 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043e\u0432 unit \u0442\u0435\u0441\u0442\u0430\u043c\u0438, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c Zod \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0441 API, unit \u0442\u0435\u0441\u0442\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0443 \u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u044b, \u0430 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0437\u0430 \u0441\u0447\u0435\u0442 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u0438 \u0440\u0443\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0435\u0440\u0435\u0434 \u0440\u0435\u043b\u0438\u0437\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u0447\u0430\u0441\u0430.<\/p>\n<h3>\u0412\u044b\u0432\u043e\u0434<\/h3>\n<ul>\n<li>\n<p><strong>Unit-\u0442\u0435\u0441\u0442\u044b \u043d\u0443\u0436\u043d\u044b<\/strong> \u0434\u043b\u044f \u043b\u043e\u0433\u0438\u043a\u0438, \u0443\u0442\u0438\u043b\u0438\u0442 \u0438 \u0445\u0443\u043a\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0435 \u043d\u0443\u0436\u043d\u044b<\/strong> \u0434\u043b\u044f UI-\u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430, API (\u0441 \u043c\u043e\u043a\u0430\u043c\u0438) \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.<\/p>\n<\/li>\n<li>\n<p><strong>\u041b\u0443\u0447\u0448\u0435 \u043c\u0435\u043d\u044c\u0448\u0435, \u043d\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0435\u0435<\/strong> \u2014 \u0442\u0435\u0441\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b <strong>\u043b\u043e\u0432\u0438\u0442\u044c \u0431\u0430\u0433\u0438<\/strong>, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u044b\u0442\u044c.<\/p>\n<\/li>\n<li>\n<p><strong>\u0414\u043e\u043f\u043e\u043b\u043d\u044f\u0439\u0442\u0435 unit-\u0442\u0435\u0441\u0442\u044b<\/strong> \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c\u0438 \u0438 E2E-\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u043c\u0438.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0422\u0435\u0441\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f, \u0430 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043b\u0438\u0448\u043d\u044e\u044e \u0440\u0430\u0431\u043e\u0442\u0443.<\/strong> \ud83d\ude80<\/p>\n<p><strong>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438:<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/t.me\/frontend_nomagic\" rel=\"noopener noreferrer nofollow\">Telegram<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.youtube.com\/channel\/UCr6T-E-joYofGHgdq-eMkqA\" rel=\"noopener noreferrer nofollow\">YouTube<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/935742\/\"> https:\/\/habr.com\/ru\/articles\/935742\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-473219","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/473219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=473219"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/473219\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=473219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=473219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=473219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}