level_0
int64
6
10k
index
int64
0
0
repo_id
stringlengths
16
148
file_path
stringlengths
33
188
content
stringlengths
17
26.8M
6
0
petrpan-code/jakeherp/portfolio/src/components/molecules
petrpan-code/jakeherp/portfolio/src/components/molecules/RecruiterForm/RecruiterForm.test.tsx
import { RecruiterForm } from '../RecruiterForm'; import { render } from '@testing-library/react'; jest.spyOn(console, 'error').mockImplementation(jest.fn); describe('RecruiterForm', () => { it('renders correctly', () => { const { container } = render(<RecruiterForm />); expect(container).toMatchSnapshot(); }); });
36
0
petrpan-code/jakeherp/portfolio/src/components/organisms
petrpan-code/jakeherp/portfolio/src/components/organisms/Header/Header.test.tsx
import { Header } from '../Header'; import { render } from '@testing-library/react'; jest.mock('@components/atoms/NavigationItem'); jest.mock('next/router', () => ({ __esModule: true, useRouter: jest.fn().mockReturnValue({ route: '', pathname: '', query: '', asPath: '', }), })); jest.mock('@components/atoms/Logo'); describe('Header', () => { it('renders correctly', () => { const { container } = render(<Header />); expect(container).toMatchSnapshot(); }); });
41
0
petrpan-code/jakeherp/portfolio/src/components/organisms
petrpan-code/jakeherp/portfolio/src/components/organisms/WorkExperience/WorkExperience.test.tsx
import { WorkExperience } from '../WorkExperience'; import { mockJobs } from '@mockdata'; import { render } from '@testing-library/react'; jest.mock('@components/atoms/ContentBlock', () => ({ ContentBlock: () => <div id="contentBlock" />, })); describe('WorkExperience', () => { it('renders correctly', () => { const { container } = render(<WorkExperience jobs={[mockJobs[0]]} />); expect(container).toMatchSnapshot(); }); });
50
0
petrpan-code/jakeherp/portfolio/src/hooks
petrpan-code/jakeherp/portfolio/src/hooks/__tests__/useOnKeyDown.test.ts
import { useOnKeyDown } from '../useOnKeyDown'; import { fireEvent } from '@testing-library/dom'; import { renderHook } from '@testing-library/react'; jest.spyOn(console, 'error').mockImplementation(() => { // TODO: fix react hooks test throwing an error with React 18 }); describe('useOnKeyDown', () => { it('calls handler on key down', () => { const key = 'Escape'; const handler = jest.fn(); renderHook(() => useOnKeyDown(key, handler)); fireEvent.keyDown(window, { key }); expect(handler).toHaveBeenCalled(); }); });
132
0
petrpan-code/oskardudycz/EventSourcing.NodeJS/samples
petrpan-code/oskardudycz/EventSourcing.NodeJS/samples/closingTheBooks/jest.config.js
module.exports = { preset: 'ts-jest', testEnvironment: 'node', roots: ['<rootDir>/src'], transform: { '^.+\\.(ts|tsx)$': 'ts-jest', }, setupFilesAfterEnv: ['./jest.setup.js'], moduleNameMapper: { '#core/(.*)': '<rootDir>/src/core/$1', '#config': '<rootDir>/config.ts', '#testing/(.*)': '<rootDir>/src/testing/$1', }, };
133
0
petrpan-code/oskardudycz/EventSourcing.NodeJS/samples
petrpan-code/oskardudycz/EventSourcing.NodeJS/samples/closingTheBooks/jest.setup.js
jest.setTimeout(180_000);
134
0
petrpan-code/oskardudycz/EventSourcing.NodeJS/samples
petrpan-code/oskardudycz/EventSourcing.NodeJS/samples/closingTheBooks/package-lock.json
"{\n \"name\": \"eventsourcing.nodejs\",\n \"version\": \"6.0.0\",\n \"lockfileVersion\": 2,\n \(...TRUNCATED)
135
0
petrpan-code/oskardudycz/EventSourcing.NodeJS/samples
petrpan-code/oskardudycz/EventSourcing.NodeJS/samples/closingTheBooks/package.json
"{\n \"name\": \"eventsourcing.nodejs\",\n \"version\": \"6.0.0\",\n \"description\": \"Samples o(...TRUNCATED)
137
0
petrpan-code/oskardudycz/EventSourcing.NodeJS/samples/closingTheBooks
petrpan-code/oskardudycz/EventSourcing.NodeJS/samples/closingTheBooks/.vscode/launch.json
"{\n \"version\": \"0.2.0\",\n \"configurations\": [\n {\n \"name\": \"Debug\",\n \"t(...TRUNCATED)
258
0
petrpan-code/oskardudycz/EventSourcing.NodeJS/samples/closingTheBooks/src/testing
"petrpan-code/oskardudycz/EventSourcing.NodeJS/samples/closingTheBooks/src/testing/eventStoreDB/even(...TRUNCATED)
"import {\n EventStoreDBContainer,\n StartedEventStoreDBContainer,\n} from './eventStoreDBContaine(...TRUNCATED)
README.md exists but content is empty. Use the Edit dataset card button to edit it.
Downloads last month
41
Edit dataset card