From 719f2dd5e255a2b8bd454a6f1f1fa6c0e6e83a4d Mon Sep 17 00:00:00 2001 From: isqua Date: Sun, 23 Jul 2023 14:14:52 +0300 Subject: [PATCH] ci: migrate to nodejs v20 --- .github/workflows/deploy.yml | 2 +- .github/workflows/main.yml | 4 ++-- src/features/FormGenerator/FormGenerator.test.tsx | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 41453ce..e2402a8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: install dependencies run: npm ci - name: build app diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d4ef0a1..e826d66 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: install dependencies run: npm ci - name: lint @@ -26,6 +26,6 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: run audit run: npm audit --production diff --git a/src/features/FormGenerator/FormGenerator.test.tsx b/src/features/FormGenerator/FormGenerator.test.tsx index f433ae2..de13686 100644 --- a/src/features/FormGenerator/FormGenerator.test.tsx +++ b/src/features/FormGenerator/FormGenerator.test.tsx @@ -43,7 +43,7 @@ describe('features/FormGenerator', () => { it('should render error but not rerender form when text is not a valid JSON', () => { const value = '{"title":"hello'; - const expectedError = 'Unexpected end of JSON input'; + const expectedError = 'Unterminated string in JSON at position 15'; render(); fireEvent.change( @@ -109,7 +109,7 @@ describe('features/FormGenerator', () => { screen.getByLabelText(formJsonInputLabel), { target: { value: userValue } }, ); - expect(screen.getByText('Unexpected end of JSON input')).toBeInTheDocument(); + expect(screen.getByText('Unterminated string in JSON at position 1')).toBeInTheDocument(); fireEvent.click(screen.getByRole('button', { name: 'Example' })); const actual = JSON.parse(screen.getByLabelText(formJsonInputLabel).value); @@ -173,7 +173,7 @@ describe('features/FormGenerator', () => { jest.runAllTimers(); await waitFor( - () => expect(screen.getByText('Unexpected end of JSON input')).toBeInTheDocument(), + () => expect(screen.getByText('Unterminated string in JSON at position 1')).toBeInTheDocument(), ); fireEvent.click(screen.getByRole('button', { name: 'Rollback' }));