This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const nextJest = require('next/jest') | |
| const createJestConfig = nextJest({ | |
| // Provide the path to your Next.js app to load next.config.js and .env files in your test environment | |
| dir: './', | |
| }) | |
| // Add any custom config to be passed to Jest | |
| const customJestConfig = { | |
| setupFilesAfterEnv: ['<rootDir>/jest.setup.js'], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "use strict"; | |
| const matter = [ | |
| null, | |
| null, | |
| null, | |
| { | |
| title: "Advanced title", | |
| description: "Some advance story", | |
| date: "2023-01-22T23:51:45.574Z", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // create a javascript type for and associative array | |
| type AssocArray = { | |
| [key: string]: string; | |
| }; | |
| // use the type to create an associative array | |
| const myArray: AssocArray = { | |
| "key1": "value1", | |
| "key2": "value2", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # developer-portal-tab-container |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * ! issues calling onFailure | |
| */ | |
| useEffect(() => { | |
| if (atsProgressStatus === 'INVALID_CREDENTIALS') { | |
| callOnFailure(); | |
| next(); | |
| // onFailure(); | |
| console.log({ atsProgressStatus }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // NOTE: this definitely is not working correctly, but is relatively close to what needs to be done | |
| useEffect(() => { | |
| if (existingIntegration) { | |
| return; | |
| } | |
| if (atsLinkStatus === ExternalAtsLinkStatusKind.InvalidCredentials) { | |
| onApiFailure(); | |
| } else { | |
| // @ts-ignore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { describe, expect, test, it } from 'vitest'; | |
| import { render, screen } from '@testing-library/react'; | |
| import userEvent from '@testing-library/user-event'; | |
| import App from '../App' | |
| describe('App renders correctly', () => { |