{"id":427413,"date":"2024-07-25T21:58:08","date_gmt":"2024-07-25T21:58:08","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=427413"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=427413","title":{"rendered":"<span>\u041a\u0430\u043a c\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c: \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b F.I.R.S.T<\/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<p>\u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u044f \u0432\u0441\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0443\u0434\u0435\u043b\u044f\u044e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u044e\u043d\u0438\u0442 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e, \u0447\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u043c\u043e\u0438\u043c \u043d\u0430\u0441\u0442\u0430\u0432\u043d\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043d\u0430 Hexlet \u0438 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435 \u043f\u0438\u0440\u0430\u043c\u0438\u0434\u044b \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0435. \u0418 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0438\u043b \u043e\u0441\u0432\u0435\u0436\u0438\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u044b \u043f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u044e\u043d\u0438\u0442 \u0442\u0435\u0441\u0442\u043e\u0432:<\/p>\n<h3>\u0411\u044b\u0441\u0442\u0440\u043e\u0442\u0430 (Fast)<\/h3>\n<p>\u0422\u0435\u0441\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e. \u0412\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443, \u0441\u0430\u043c \u0442\u0435\u0441\u0442 \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435, \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u044b\u0441\u044f\u0447\u0438 \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<h3>\u0418\u0437\u043e\u043b\u044f\u0446\u0438\u044f (Isolated\/Independent)<\/h3>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0442\u0435\u0441\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c. \u041e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 &#171;\u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430&#187; (Arrange, Act, Assert) \u0431\u0435\u0437 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u0438\u043b\u0438 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u041f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c\u043e\u0441\u0442\u044c (Repeatable)<\/h3>\n<p>\u0422\u0435\u0441\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432 \u043b\u044e\u0431\u043e\u0439 \u0441\u0440\u0435\u0434\u0435 \u0438 \u0432 \u043b\u044e\u0431\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u0434\u0430\u0442\u0430\/\u0432\u0440\u0435\u043c\u044f \u0438\u043b\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u0421\u0430\u043c\u043e\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c (Self-Validating)<\/h3>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0442\u0435\u0441\u0442\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u044f\u0441\u043d\u044b \u0431\u0435\u0437 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u2014 \u0442\u0435\u0441\u0442 \u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442, \u043b\u0438\u0431\u043e \u043d\u0435\u0442, \u0431\u0435\u0437 \u0432\u0441\u044f\u043a\u043e\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438.<\/p>\n<h3>\u0422\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c (Thorough\/Timely)<\/h3>\n<p>\u0422\u0435\u0441\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f, \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044f\u0441\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0441\u0442\u0440\u0435\u043c\u043b\u0435\u043d\u0438\u0435\u043c \u043a 100% \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044e \u043a\u043e\u0434\u0430. \u0412\u0430\u0436\u043d\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043c\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c, \u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0443\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439.<\/p>\n<hr\/>\n<h3>\u0420\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 React \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u043e\u0432 FIRST<\/h3>\n<h4>1. \u0411\u044b\u0441\u0442\u0440\u043e\u0442\u0430 (Fast)<\/h4>\n<pre><code class=\"javascript\">\/\/ \u274c \u041f\u043b\u043e\u0445\u043e\u0439 \u0442\u0435\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 API it('fetches and displays user data', async () =&gt; {   render(&lt;UserProfile userId=\"123\" \/&gt;);   await waitFor(() =&gt; expect(screen.getByText(\/Username\/)).toBeInTheDocument()); });<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u0442\u0435\u0441\u0442 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043a API.<\/p>\n<p><strong>\u0425\u043e\u0440\u043e\u0448\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/strong><\/p>\n<pre><code class=\"javascript\">\/\/ \u2705 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u043a\u043e\u0432 \u0434\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432, \/\/ \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0435\u0441\u0442 \u0431\u044b\u0441\u0442\u0440\u044b\u043c \u0438 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u043c jest.mock('api\/userApi'); it('displays user data from mock', () =&gt; {   userApi.getUser.mockResolvedValue({ id: '123', name: 'John Doe' });   render(&lt;UserProfile userId=\"123\" \/&gt;);   expect(screen.getByText(\/John Doe\/)).toBeInTheDocument(); }); <\/code><\/pre>\n<h4>2. \u0418\u0437\u043e\u043b\u044f\u0446\u0438\u044f (Isolated\/Independent)<\/h4>\n<p><strong>\u041f\u043b\u043e\u0445\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/strong><\/p>\n<pre><code class=\"typescript\">\/\/ \u274c \u042d\u0442\u0438 \u0442\u0435\u0441\u0442\u044b \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430 \u0438\u0437-\u0437\u0430 \u043e\u0431\u0449\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0445\u0443\u043a\u0430 const { result } = renderHook(() =&gt; useCounter()); it('increments counter', () =&gt; {   act(() =&gt; { result.current.increment(); });   expect(result.current.count).toBe(1); });  it('increments counter again', () =&gt; {   act(() =&gt; { result.current.increment(); });   expect(result.current.count).toBe(2); }); <\/code><\/pre>\n<p><strong>\u0425\u043e\u0440\u043e\u0448\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/strong><\/p>\n<pre><code class=\"javascript\">\/\/ \u2705 \u041a\u0430\u0436\u0434\u044b\u0439 \u0442\u0435\u0441\u0442 \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d it('increments counter', () =&gt; {   const { result } = renderHook(() =&gt; useCounter());   act(() =&gt; { result.current.increment(); });   expect(result.current.count).toBe(1); });  it('increments counter independently', () =&gt; {   const { result } = renderHook(() =&gt; useCounter());   act(() =&gt; { result.current.increment(); });   expect(result.current.count).toBe(1); });<\/code><\/pre>\n<h4>3. \u041f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c\u043e\u0441\u0442\u044c (Repeatable)<\/h4>\n<p><strong>\u041f\u043b\u043e\u0445\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/strong><\/p>\n<pre><code class=\"javascript\">\/\/ \u274c \u0422\u0435\u0441\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0434\u0430\u0442\u044b it('shows current date', () =&gt; {   render(&lt;CurrentDateDisplay \/&gt;);   const today = new Date().toISOString().slice(0, 10);   expect(screen.getByText(today)).toBeInTheDocument(); }); <\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u0442\u0435\u0441\u0442 \u0434\u0430\u0441\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c.<\/p>\n<p><strong>\u0425\u043e\u0440\u043e\u0448\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/strong><\/p>\n<pre><code class=\"javascript\">\/\/ \u2705 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0434\u0430\u0442\u044b \u0432 \u0442\u0435\u0441\u0442\u0430\u0445, \/\/ \u0447\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c\u043e\u0441\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 it('shows current date', () =&gt; {   jest.useFakeTimers().setSystemTime(new Date('2024-01-01'));   render(&lt;CurrentDateDisplay \/&gt;);   expect(screen.getByText('2024-01-01')).toBeInTheDocument(); });<\/code><\/pre>\n<h4>4. \u0421\u0430\u043c\u043e\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c (Self-Validating)<\/h4>\n<p><strong>\u041f\u043b\u043e\u0445\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/strong><\/p>\n<pre><code class=\"javascript\">\/\/ \u274c \u0422\u0435\u0441\u0442 \u043d\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e it('renders correctly', () =&gt; {   const component = render(&lt;MyComponent \/&gt;);   console.log(component); \/\/ \u0422\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432\u044b\u0432\u043e\u0434\u0430 });<\/code><\/pre>\n<p><strong>\u0425\u043e\u0440\u043e\u0448\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/strong><\/p>\n<pre><code class=\"javascript\">\/\/ \u2705 \u0422\u0435\u0441\u0442 \u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 it('renders correctly', () =&gt; {   render(&lt;MyComponent \/&gt;);   expect(screen.getByText('Hello World')).toBeInTheDocument(); });<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u0442\u0435\u0441\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u0430\u043c\u043e\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u0435\u043d \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438.<\/p>\n<h4>5. \u0422\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c (Thorough\/Timely)<\/h4>\n<p><strong>\u041f\u043b\u043e\u0445\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/strong><\/p>\n<pre><code class=\"javascript\">\/\/ \u274c \u0422\u0435\u0441\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 it('shows loading state', () =&gt; {   render(&lt;DataLoader \/&gt;);   expect(screen.getByText('Loading...')).toBeInTheDocument(); });<\/code><\/pre>\n<p>\u0422\u0435\u0441\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438.<\/p>\n<p><strong>\u0425\u043e\u0440\u043e\u0448\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/strong><\/p>\n<pre><code class=\"javascript\">\/\/ \u2705 \u042d\u0442\u0438 \u0442\u0435\u0441\u0442\u044b \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 it('shows loading state', () =&gt; {   render(&lt;DataLoader \/&gt;);   expect(screen.getByText('Loading...')).toBeInTheDocument(); });  it('displays data after loading', async () =&gt; {   const mockData = { text: 'Data loaded' };   fetchData.mockResolvedValue(mockData);   render(&lt;DataLoader \/&gt;);   expect(await screen.findByText('Data loaded')).toBeInTheDocument(); });  it('shows error when data fails to load', async () =&gt; {   fetchData.mockRejectedValue('Error loading data');   render(&lt;DataLoader \/&gt;);   expect(await screen.findByText('Error loading data')).toBeInTheDocument(); });<\/code><\/pre>\n<p><em>\u041f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0439\u0442\u0435\u0441\u044c \u0432 <\/em><a href=\"https:\/\/t.me\/+mYjkCI2XDqI4NzQy\" rel=\"noopener noreferrer nofollow\"><em>\u043c\u043e\u0439  tg<\/em><\/a><em>, \u0442\u0430\u043c \u044f \u043f\u0438\u0448\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0437\u0430\u043c\u0435\u0442\u043a\u0438 \u043f\u043e QA<\/em><\/p>\n<\/p>\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\/830962\/\"> https:\/\/habr.com\/ru\/articles\/830962\/<\/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<p>\u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u044f \u0432\u0441\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0443\u0434\u0435\u043b\u044f\u044e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u044e\u043d\u0438\u0442 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e, \u0447\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u043c\u043e\u0438\u043c \u043d\u0430\u0441\u0442\u0430\u0432\u043d\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043d\u0430 Hexlet \u0438 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435 \u043f\u0438\u0440\u0430\u043c\u0438\u0434\u044b \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0435. \u0418 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0438\u043b \u043e\u0441\u0432\u0435\u0436\u0438\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u044b \u043f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u044e\u043d\u0438\u0442 \u0442\u0435\u0441\u0442\u043e\u0432:<\/p>\n<h3>\u0411\u044b\u0441\u0442\u0440\u043e\u0442\u0430 (Fast)<\/h3>\n<p>\u0422\u0435\u0441\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e. \u0412\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443, \u0441\u0430\u043c \u0442\u0435\u0441\u0442 \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435, \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u044b\u0441\u044f\u0447\u0438 \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<h3>\u0418\u0437\u043e\u043b\u044f\u0446\u0438\u044f (Isolated\/Independent)<\/h3>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0442\u0435\u0441\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c. \u041e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 &#171;\u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430&#187; (Arrange, Act, Assert) \u0431\u0435\u0437 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u0438\u043b\u0438 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u041f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c\u043e\u0441\u0442\u044c (Repeatable)<\/h3>\n<p>\u0422\u0435\u0441\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432 \u043b\u044e\u0431\u043e\u0439 \u0441\u0440\u0435\u0434\u0435 \u0438 \u0432 \u043b\u044e\u0431\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u0434\u0430\u0442\u0430\/\u0432\u0440\u0435\u043c\u044f \u0438\u043b\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u0421\u0430\u043c\u043e\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c (Self-Validating)<\/h3>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0442\u0435\u0441\u0442\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u044f\u0441\u043d\u044b \u0431\u0435\u0437 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u2014 \u0442\u0435\u0441\u0442 \u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442, \u043b\u0438\u0431\u043e \u043d\u0435\u0442, \u0431\u0435\u0437 \u0432\u0441\u044f\u043a\u043e\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438.<\/p>\n<h3>\u0422\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c (Thorough\/Timely)<\/h3>\n<p>\u0422\u0435\u0441\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f, \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044f\u0441\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0441\u0442\u0440\u0435\u043c\u043b\u0435\u043d\u0438\u0435\u043c \u043a 100% \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044e \u043a\u043e\u0434\u0430. \u0412\u0430\u0436\u043d\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043c\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c, \u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0443\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439.<\/p>\n<hr\/>\n<h3>\u0420\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 React \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u043e\u0432 FIRST<\/h3>\n<h4>1. \u0411\u044b\u0441\u0442\u0440\u043e\u0442\u0430 (Fast)<\/h4>\n<pre><code class=\"javascript\">\/\/ \u274c \u041f\u043b\u043e\u0445\u043e\u0439 \u0442\u0435\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 API it('fetches and displays user data', async () =&gt; {   render(&lt;UserProfile userId=\"123\" \/&gt;);   await waitFor(() =&gt; expect(screen.getByText(\/Username\/)).toBeInTheDocument()); });<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u0442\u0435\u0441\u0442 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043a API.<\/p>\n<p><strong>\u0425\u043e\u0440\u043e\u0448\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/strong><\/p>\n<pre><code class=\"javascript\">\/\/ \u2705 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u043a\u043e\u0432 \u0434\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432, \/\/ \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0435\u0441\u0442 \u0431\u044b\u0441\u0442\u0440\u044b\u043c \u0438 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u043c jest.mock('api\/userApi'); it('displays user data from mock', () =&gt; {   userApi.getUser.mockResolvedValue({ id: '123', name: 'John Doe' });   render(&lt;UserProfile userId=\"123\" \/&gt;);   expect(screen.getByText(\/John Doe\/)).toBeInTheDocument(); }); <\/code><\/pre>\n<h4>2. \u0418\u0437\u043e\u043b\u044f\u0446\u0438\u044f (Isolated\/Independent)<\/h4>\n<p><strong>\u041f\u043b\u043e\u0445\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/strong><\/p>\n<pre><code class=\"typescript\">\/\/ \u274c \u042d\u0442\u0438 \u0442\u0435\u0441\u0442\u044b \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430 \u0438\u0437-\u0437\u0430 \u043e\u0431\u0449\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0445\u0443\u043a\u0430 const { result } = renderHook(() =&gt; useCounter()); it('increments counter', () =&gt; {   act(() =&gt; { result.current.increment(); });   expect(result.current.count).toBe(1); });  it('increments counter again', () =&gt; {   act(() =&gt; { result.current.increment(); });   expect(result.current.count).toBe(2); }); <\/code><\/pre>\n<p><strong>\u0425\u043e\u0440\u043e\u0448\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/strong><\/p>\n<pre><code class=\"javascript\">\/\/ \u2705 \u041a\u0430\u0436\u0434\u044b\u0439 \u0442\u0435\u0441\u0442 \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d it('increments counter', () =&gt; {   const { result } = renderHook(() =&gt; useCounter());   act(() =&gt; { result.current.increment(); });   expect(result.current.count).toBe(1); });  it('increments counter independently', () =&gt; {   const { result } = renderHook(() =&gt; useCounter());   act(() =&gt; { result.current.increment(); });   expect(result.current.count).toBe(1); });<\/code><\/pre>\n<h4>3. \u041f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c\u043e\u0441\u0442\u044c (Repeatable)<\/h4>\n<p><strong>\u041f\u043b\u043e\u0445\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/strong><\/p>\n<pre><code class=\"javascript\">\/\/ \u274c \u0422\u0435\u0441\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0434\u0430\u0442\u044b it('shows current date', () =&gt; {   render(&lt;CurrentDateDisplay \/&gt;);   const today = new Date().toISOString().slice(0, 10);   expect(screen.getByText(today)).toBeInTheDocument(); }); <\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u0442\u0435\u0441\u0442 \u0434\u0430\u0441\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c.<\/p>\n<p><strong>\u0425\u043e\u0440\u043e\u0448\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/strong><\/p>\n<pre><code class=\"javascript\">\/\/ \u2705 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0434\u0430\u0442\u044b \u0432 \u0442\u0435\u0441\u0442\u0430\u0445, \/\/ \u0447\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c\u043e\u0441\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 it('shows current date', () =&gt; {   jest.useFakeTimers().setSystemTime(new Date('2024-01-01'));   render(&lt;CurrentDateDisplay \/&gt;);   expect(screen.getByText('2024-01-01')).toBeInTheDocument(); });<\/code><\/pre>\n<h4>4. \u0421\u0430\u043c\u043e\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c (Self-Validating)<\/h4>\n<p><strong>\u041f\u043b\u043e\u0445\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/strong><\/p>\n<pre><code class=\"javascript\">\/\/ \u274c \u0422\u0435\u0441\u0442 \u043d\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e it('renders correctly', () =&gt; {   const component = render(&lt;MyComponent \/&gt;);   console.log(component); \/\/ \u0422\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432\u044b\u0432\u043e\u0434\u0430 });<\/code><\/pre>\n<p><strong>\u0425\u043e\u0440\u043e\u0448\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/strong><\/p>\n<pre><code class=\"javascript\">\/\/ \u2705 \u0422\u0435\u0441\u0442 \u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 it('renders correctly', () =&gt; {   render(&lt;MyComponent \/&gt;);   expect(screen.getByText('Hello World')).toBeInTheDocument(); });<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u0442\u0435\u0441\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u0430\u043c\u043e\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u0435\u043d \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438.<\/p>\n<h4>5. \u0422\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c (Thorough\/Timely)<\/h4>\n<p><strong>\u041f\u043b\u043e\u0445\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/strong><\/p>\n<pre><code class=\"javascript\">\/\/ \u274c \u0422\u0435\u0441\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 it('shows loading state', () =&gt; {   render(&lt;DataLoader \/&gt;);   expect(screen.getByText('Loading...')).toBeInTheDocument(); });<\/code><\/pre>\n<p>\u0422\u0435\u0441\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438.<\/p>\n<p><strong>\u0425\u043e\u0440\u043e\u0448\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/strong><\/p>\n<pre><code class=\"javascript\">\/\/ \u2705 \u042d\u0442\u0438 \u0442\u0435\u0441\u0442\u044b \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 it('shows loading state', () =&gt; {   render(&lt;DataLoader \/&gt;);   expect(screen.getByText('Loading...')).toBeInTheDocument(); });  it('displays data after loading', async () =&gt; {   const mockData = { text: 'Data loaded' };   fetchData.mockResolvedValue(mockData);   render(&lt;DataLoader \/&gt;);   expect(await screen.findByText('Data loaded')).toBeInTheDocument(); });  it('shows error when data fails to load', async () =&gt; {   fetchData.mockRejectedValue('Error loading data');   render(&lt;DataLoader \/&gt;);   expect(await screen.findByText('Error loading data')).toBeInTheDocument(); });<\/code><\/pre>\n<p><em>\u041f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0439\u0442\u0435\u0441\u044c \u0432 <\/em><a href=\"https:\/\/t.me\/+mYjkCI2XDqI4NzQy\" rel=\"noopener noreferrer nofollow\"><em>\u043c\u043e\u0439  tg<\/em><\/a><em>, \u0442\u0430\u043c \u044f \u043f\u0438\u0448\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0437\u0430\u043c\u0435\u0442\u043a\u0438 \u043f\u043e QA<\/em><\/p>\n<\/p>\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\/830962\/\"> https:\/\/habr.com\/ru\/articles\/830962\/<\/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-427413","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/427413","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=427413"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/427413\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=427413"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=427413"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=427413"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}