level_0 int64 0 10k | index int64 0 0 | repo_id stringlengths 22 152 | file_path stringlengths 41 203 | content stringlengths 11 11.5M |
|---|---|---|---|---|
7,129 | 0 | petrpan-code/airbnb/visx/packages/visx-annotation | petrpan-code/airbnb/visx/packages/visx-annotation/test/tsconfig.json | {
"compilerOptions": {
"composite": false,
"emitDeclarationOnly": false,
"noEmit": true,
"rootDir": "."
},
"extends": "../../../tsconfig.options.json",
"include": ["**/*", "../types/**/*", "../../../types/**/*"],
"references": [
{
"path": ".."
}
]
}
|
7,149 | 0 | petrpan-code/airbnb/visx/packages/visx-axis | petrpan-code/airbnb/visx/packages/visx-axis/test/Axis.test.tsx | import React from 'react';
import { shallow, ShallowWrapper } from 'enzyme';
import { render } from '@testing-library/react';
import { Line } from '@visx/shape';
import { Text } from '@visx/text';
import { scaleBand, scaleLinear } from '@visx/scale';
import { Axis } from '../src';
const getTickLine = (
wrapper: Sha... |
7,150 | 0 | petrpan-code/airbnb/visx/packages/visx-axis | petrpan-code/airbnb/visx/packages/visx-axis/test/AxisBottom.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { scaleLinear } from '@visx/scale';
import { Axis, AxisBottom } from '../src';
const axisProps = {
scale: scaleLinear({
range: [10, 0],
round: true,
domain: [0, 10],
}),
};
describe('<AxisBottom />', () => {
it('should be defined',... |
7,151 | 0 | petrpan-code/airbnb/visx/packages/visx-axis | petrpan-code/airbnb/visx/packages/visx-axis/test/AxisLeft.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { scaleLinear } from '@visx/scale';
import { Axis, AxisLeft } from '../src';
const axisProps = {
scale: scaleLinear({
range: [10, 0],
round: true,
domain: [0, 10],
}),
};
describe('<AxisLeft />', () => {
it('should be defined', () ... |
7,152 | 0 | petrpan-code/airbnb/visx/packages/visx-axis | petrpan-code/airbnb/visx/packages/visx-axis/test/AxisRight.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { scaleLinear } from '@visx/scale';
import { Axis, AxisRight } from '../src';
const axisProps = {
scale: scaleLinear({
range: [10, 0],
round: true,
domain: [0, 10],
}),
};
describe('<AxisRight />', () => {
it('should be defined', (... |
7,153 | 0 | petrpan-code/airbnb/visx/packages/visx-axis | petrpan-code/airbnb/visx/packages/visx-axis/test/AxisTop.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { scaleLinear } from '@visx/scale';
import { Axis, AxisTop } from '../src';
const axisProps = {
scale: scaleLinear({
range: [10, 0],
round: true,
domain: [0, 10],
}),
};
describe('<AxisTop />', () => {
it('should be defined', () =>... |
7,154 | 0 | petrpan-code/airbnb/visx/packages/visx-axis | petrpan-code/airbnb/visx/packages/visx-axis/test/Orientation.test.ts | import { Orientation } from '../src';
describe('Orientation', () => {
it('should have keys for top/right/bottom/left', () => {
expect(Orientation).toEqual({
top: expect.any(String),
right: expect.any(String),
bottom: expect.any(String),
left: expect.any(String),
});
});
});
|
7,155 | 0 | petrpan-code/airbnb/visx/packages/visx-axis | petrpan-code/airbnb/visx/packages/visx-axis/test/scales.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import {
scaleBand,
scaleLinear,
scaleLog,
scaleOrdinal,
scalePoint,
scalePower,
scaleQuantile,
scaleQuantize,
scaleSymlog,
scaleThreshold,
scaleTime,
scaleUtc,
} from '@visx/scale';
import { Axis } from '../src';
const axisProps = {
... |
7,156 | 0 | petrpan-code/airbnb/visx/packages/visx-axis | petrpan-code/airbnb/visx/packages/visx-axis/test/tsconfig.json | {
"compilerOptions": {
"composite": false,
"emitDeclarationOnly": false,
"noEmit": true,
"rootDir": "."
},
"extends": "../../../tsconfig.options.json",
"include": ["**/*", "../types/**/*", "../../../types/**/*"],
"references": [
{
"path": ".."
}
]
}
|
7,157 | 0 | petrpan-code/airbnb/visx/packages/visx-axis/test | petrpan-code/airbnb/visx/packages/visx-axis/test/utils/getAxisRangePaddingConfig.test.ts | import getAxisRangePaddingConfig, {
defaultAxisRangePadding,
} from '../../src/utils/getAxisRangePaddingConfig';
describe('getAxisRangePaddingConfig(rangePadding)', () => {
it('should return default range padding config', () => {
const actualResult = getAxisRangePaddingConfig();
const expectedResult = { st... |
7,158 | 0 | petrpan-code/airbnb/visx/packages/visx-axis/test | petrpan-code/airbnb/visx/packages/visx-axis/test/utils/getTickPosition.test.ts | import { scaleLinear, scaleBand } from '@visx/scale';
import getTickPosition from '../../src/utils/getTickPosition';
describe('getTickPosition(scale, align)', () => {
describe('scales without band', () => {
it('return center position', () => {
const position = getTickPosition(scaleLinear({ domain: [0, 10],... |
7,165 | 0 | petrpan-code/airbnb/visx/packages/visx-bounds | petrpan-code/airbnb/visx/packages/visx-bounds/test/tsconfig.json | {
"compilerOptions": {
"composite": false,
"emitDeclarationOnly": false,
"noEmit": true,
"rootDir": "."
},
"extends": "../../../tsconfig.options.json",
"include": ["**/*", "../types/**/*", "../../../types/**/*"],
"references": [
{
"path": ".."
}
]
}
|
7,166 | 0 | petrpan-code/airbnb/visx/packages/visx-bounds | petrpan-code/airbnb/visx/packages/visx-bounds/test/withBoundingRects.test.tsx | /* eslint-disable jsx-a11y/no-static-element-interactions */
/* eslint-disable jsx-a11y/click-events-have-key-events */
import React, { ReactNode } from 'react';
import { render, waitFor } from '@testing-library/react';
import fireEvent from '@testing-library/user-event';
import { withBoundingRects } from '../src';
imp... |
7,179 | 0 | petrpan-code/airbnb/visx/packages/visx-brush | petrpan-code/airbnb/visx/packages/visx-brush/test/Brush.test.tsx | import { Brush } from '../src';
describe('<Brush />', () => {
test('it should be defined', () => {
expect(Brush).toBeDefined();
});
});
|
7,180 | 0 | petrpan-code/airbnb/visx/packages/visx-brush | petrpan-code/airbnb/visx/packages/visx-brush/test/tsconfig.json | {
"compilerOptions": {
"composite": false,
"emitDeclarationOnly": false,
"noEmit": true,
"rootDir": "."
},
"extends": "../../../tsconfig.options.json",
"include": ["**/*", "../types/**/*", "../../../types/**/*"],
"references": [
{
"path": ".."
}
]
}
|
7,181 | 0 | petrpan-code/airbnb/visx/packages/visx-brush | petrpan-code/airbnb/visx/packages/visx-brush/test/utils.test.ts | import { createScale } from '@visx/scale';
import { getDomainFromExtent, scaleInvert } from '../src/utils';
describe('getDomainFromExtent()', () => {
test('it should return { start, end } if scale.invert', () => {
const scale = createScale({ domain: [0, 10], range: [2, 4] });
const start = 0;
const end =... |
7,189 | 0 | petrpan-code/airbnb/visx/packages/visx-chord | petrpan-code/airbnb/visx/packages/visx-chord/test/Chord.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { Chord } from '../src';
const matrix = [
[11975, 5871, 8916, 2868],
[1951, 10048, 2060, 6171],
[8010, 16145, 8090, 8045],
[1013, 990, 940, 6907],
];
type WrapperProps = {
matrix: number[][];
children: () => React.ReactNode;
};
const Cho... |
7,190 | 0 | petrpan-code/airbnb/visx/packages/visx-chord | petrpan-code/airbnb/visx/packages/visx-chord/test/Ribbon.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { chord as d3Chord } from 'd3-chord';
import { Ribbon } from '../src';
const matrix = [
[11975, 5871, 8916, 2868],
[1951, 10048, 2060, 6171],
[8010, 16145, 8090, 8045],
[1013, 990, 940, 6907],
];
const chords = d3Chord()(matrix);
describe('<... |
7,191 | 0 | petrpan-code/airbnb/visx/packages/visx-chord | petrpan-code/airbnb/visx/packages/visx-chord/test/tsconfig.json | {
"compilerOptions": {
"composite": false,
"emitDeclarationOnly": false,
"noEmit": true,
"rootDir": "."
},
"extends": "../../../tsconfig.options.json",
"include": ["**/*", "../types/**/*", "../../../types/**/*"],
"references": [
{
"path": ".."
}
]
}
|
7,200 | 0 | petrpan-code/airbnb/visx/packages/visx-clip-path | petrpan-code/airbnb/visx/packages/visx-clip-path/test/ClipPaths.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { ClipPath, CircleClipPath, RectClipPath } from '../src';
describe('<ClipPath />', () => {
test('it should be defined', () => {
expect(ClipPath).toBeDefined();
});
test('it should render defs and clipPath elements', () => {
const wrapp... |
7,201 | 0 | petrpan-code/airbnb/visx/packages/visx-clip-path | petrpan-code/airbnb/visx/packages/visx-clip-path/test/tsconfig.json | {
"compilerOptions": {
"composite": false,
"emitDeclarationOnly": false,
"noEmit": true,
"rootDir": "."
},
"extends": "../../../tsconfig.options.json",
"include": ["**/*", "../types/**/*", "../../../types/**/*"],
"references": [
{
"path": ".."
}
]
}
|
7,207 | 0 | petrpan-code/airbnb/visx/packages/visx-curve | petrpan-code/airbnb/visx/packages/visx-curve/test/curve.test.ts | import {
curveBasis,
curveBasisClosed,
curveBasisOpen,
curveStep,
curveStepAfter,
curveStepBefore,
curveBundle,
curveLinear,
curveLinearClosed,
curveCardinal,
curveCardinalClosed,
curveCardinalOpen,
curveCatmullRom,
curveCatmullRomClosed,
curveCatmullRomOpen,
curveMonotoneX,
curveMonot... |
7,208 | 0 | petrpan-code/airbnb/visx/packages/visx-curve | petrpan-code/airbnb/visx/packages/visx-curve/test/tsconfig.json | {
"compilerOptions": {
"composite": false,
"emitDeclarationOnly": false,
"noEmit": true,
"rootDir": "."
},
"extends": "../../../tsconfig.options.json",
"include": ["**/*", "../types/**/*", "../../../types/**/*"],
"references": [
{
"path": ".."
}
]
}
|
7,217 | 0 | petrpan-code/airbnb/visx/packages/visx-delaunay | petrpan-code/airbnb/visx/packages/visx-delaunay/test/Polygon.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { Polygon } from '../src';
describe('<Polygon />', () => {
const polygon: [number, number][] = new Array(3).fill(null).map((_, i) => [i, i]);
const props = { polygon };
test('it should be defined', () => {
expect(Polygon).toBeDefined();
... |
7,218 | 0 | petrpan-code/airbnb/visx/packages/visx-delaunay | petrpan-code/airbnb/visx/packages/visx-delaunay/test/delaunay.test.ts | import { delaunay } from '../src';
const data = [
{ x: 10, y: 10 },
{ x: 10, y: 20 },
{ x: 20, y: 20 },
{ x: 20, y: 10 },
];
describe('delaunay', () => {
test('it should be defined', () => {
expect(delaunay).toBeDefined();
});
test('it should find closest point', () => {
const delaunayDiagram =... |
7,219 | 0 | petrpan-code/airbnb/visx/packages/visx-delaunay | petrpan-code/airbnb/visx/packages/visx-delaunay/test/tsconfig.json | {
"compilerOptions": {
"composite": false,
"emitDeclarationOnly": false,
"noEmit": true,
"rootDir": "."
},
"extends": "../../../tsconfig.options.json",
"include": ["**/*", "../types/**/*", "../../../types/**/*"],
"references": [
{
"path": ".."
}
]
}
|
7,220 | 0 | petrpan-code/airbnb/visx/packages/visx-delaunay | petrpan-code/airbnb/visx/packages/visx-delaunay/test/voronoi.test.ts | import { voronoi } from '../src';
const x = () => 123;
const y = () => 123;
describe('voronoi', () => {
test('it should be defined', () => {
expect(voronoi).toBeDefined();
});
test('width and height params should define extent', () => {
const width = 17;
const height = 99;
const v = voronoi({ w... |
7,630 | 0 | petrpan-code/airbnb/visx/packages/visx-drag | petrpan-code/airbnb/visx/packages/visx-drag/test/Drag.test.ts | import { Drag } from '../src';
describe('Drag', () => {
test('it should be defined', () => {
expect(Drag).toBeDefined();
});
});
|
7,631 | 0 | petrpan-code/airbnb/visx/packages/visx-drag | petrpan-code/airbnb/visx/packages/visx-drag/test/raise.test.ts | import { raise } from '../src';
describe('raise', () => {
test('it should be defined', () => {
expect(raise).toBeDefined();
});
});
|
7,632 | 0 | petrpan-code/airbnb/visx/packages/visx-drag | petrpan-code/airbnb/visx/packages/visx-drag/test/tsconfig.json | {
"compilerOptions": {
"composite": false,
"emitDeclarationOnly": false,
"noEmit": true,
"rootDir": "."
},
"extends": "../../../tsconfig.options.json",
"include": ["**/*", "../types/**/*", "../../../types/**/*"],
"references": [
{
"path": ".."
}
]
}
|
7,633 | 0 | petrpan-code/airbnb/visx/packages/visx-drag | petrpan-code/airbnb/visx/packages/visx-drag/test/useDrag.test.tsx | import React, { useRef } from 'react';
import { render } from '@testing-library/react';
import { useDrag } from '../src';
import { UseDragOptions } from '../lib/useDrag';
describe('useDrag', () => {
test('it should be defined', () => {
expect(useDrag).toBeDefined();
});
test('should provide UseDrag', () => {... |
7,634 | 0 | petrpan-code/airbnb/visx/packages/visx-drag | petrpan-code/airbnb/visx/packages/visx-drag/test/useStateWithCallback.test.ts | import useStateWithCallback from '../src/util/useStateWithCallback';
describe('useStateWithCallback', () => {
test('it should be defined', () => {
expect(useStateWithCallback).toBeDefined();
});
});
|
7,646 | 0 | petrpan-code/airbnb/visx/packages/visx-event | petrpan-code/airbnb/visx/packages/visx-event/test/getXandYFromEvent.test.ts | import getXAndYFromEvent from '../src/getXAndYFromEvent';
describe('getXAndYFromEvent()', () => {
it('should return { x: 0, y: 0 } if no event argument', () => {
const result = getXAndYFromEvent();
// @ts-expect-error
const result2 = getXAndYFromEvent(null);
expect(result).toEqual({ x: 0, y: 0 });
... |
7,647 | 0 | petrpan-code/airbnb/visx/packages/visx-event | petrpan-code/airbnb/visx/packages/visx-event/test/localPoint.test.ts | import { Point } from '@visx/point';
import { localPoint } from '../src';
import localPointGeneric from '../src/localPointGeneric';
describe('localPoint', () => {
test('it should be defined', () => {
expect(localPoint).toBeDefined();
});
test('it should return null if called with no arguments', () => {
... |
7,648 | 0 | petrpan-code/airbnb/visx/packages/visx-event | petrpan-code/airbnb/visx/packages/visx-event/test/tsconfig.json | {
"compilerOptions": {
"composite": false,
"emitDeclarationOnly": false,
"noEmit": true,
"rootDir": "."
},
"extends": "../../../tsconfig.options.json",
"include": ["**/*", "../types/**/*", "../../../types/**/*"],
"references": [
{
"path": ".."
}
]
}
|
7,664 | 0 | petrpan-code/airbnb/visx/packages/visx-geo | petrpan-code/airbnb/visx/packages/visx-geo/test/Albers.test.tsx | import { Albers } from '../src';
describe('<Albers />', () => {
test('it should be defined', () => {
expect(Albers).toBeDefined();
});
});
|
7,665 | 0 | petrpan-code/airbnb/visx/packages/visx-geo | petrpan-code/airbnb/visx/packages/visx-geo/test/AlbersUsa.test.tsx | import { AlbersUsa } from '../src';
describe('<AlbersUsa />', () => {
test('it should be defined', () => {
expect(AlbersUsa).toBeDefined();
});
});
|
7,666 | 0 | petrpan-code/airbnb/visx/packages/visx-geo | petrpan-code/airbnb/visx/packages/visx-geo/test/CustomProjection.test.tsx | import { CustomProjection } from '../src';
describe('<CustomProjection />', () => {
test('it should be defined', () => {
expect(CustomProjection).toBeDefined();
});
});
|
7,667 | 0 | petrpan-code/airbnb/visx/packages/visx-geo | petrpan-code/airbnb/visx/packages/visx-geo/test/EqualEarth.test.tsx | import { EqualEarth } from '../src';
describe('<EqualEarth />', () => {
test('it should be defined', () => {
expect(EqualEarth).toBeDefined();
});
});
|
7,668 | 0 | petrpan-code/airbnb/visx/packages/visx-geo | petrpan-code/airbnb/visx/packages/visx-geo/test/Mercator.test.tsx | import { Mercator } from '../src';
describe('<Mercator />', () => {
test('it should be defined', () => {
expect(Mercator).toBeDefined();
});
});
|
7,669 | 0 | petrpan-code/airbnb/visx/packages/visx-geo | petrpan-code/airbnb/visx/packages/visx-geo/test/Orthographic.test.tsx | import { Orthographic } from '../src';
describe('<Orthographic />', () => {
test('it should be defined', () => {
expect(Orthographic).toBeDefined();
});
});
|
7,670 | 0 | petrpan-code/airbnb/visx/packages/visx-geo | petrpan-code/airbnb/visx/packages/visx-geo/test/Projection.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { feature } from 'topojson-client';
// eslint-disable-next-line import/no-unresolved
import { GeometryCollection } from 'geojson';
import Projection from '../src/projections/Projection';
// @ts-expect-error doesn't like .json
import topology from './t... |
7,672 | 0 | petrpan-code/airbnb/visx/packages/visx-geo | petrpan-code/airbnb/visx/packages/visx-geo/test/tsconfig.json | {
"compilerOptions": {
"composite": false,
"emitDeclarationOnly": false,
"noEmit": true,
"rootDir": "."
},
"extends": "../../../tsconfig.options.json",
"include": ["**/*", "../types/**/*", "../../../types/**/*"],
"references": [
{
"path": ".."
}
]
}
|
7,687 | 0 | petrpan-code/airbnb/visx/packages/visx-glyph | petrpan-code/airbnb/visx/packages/visx-glyph/test/Circle.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { GlyphCircle } from '../src';
describe('<GlyphCircle />', () => {
test('it should be defined', () => {
expect(GlyphCircle).toBeDefined();
});
test('it should be wrapped in a <Glyph />', () => {
const wrapper = shallow(<GlyphCircle />)... |
7,688 | 0 | petrpan-code/airbnb/visx/packages/visx-glyph | petrpan-code/airbnb/visx/packages/visx-glyph/test/Cross.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { GlyphCross } from '../src';
describe('<GlyphCross />', () => {
test('it should be defined', () => {
expect(GlyphCross).toBeDefined();
});
test('it should be wrapped in a <Glyph />', () => {
const wrapper = shallow(<GlyphCross />);
... |
7,689 | 0 | petrpan-code/airbnb/visx/packages/visx-glyph | petrpan-code/airbnb/visx/packages/visx-glyph/test/Diamond.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { GlyphDiamond } from '../src';
describe('<GlyphDiamond />', () => {
test('it should be defined', () => {
expect(GlyphDiamond).toBeDefined();
});
test('it should be wrapped in a <Glyph />', () => {
const wrapper = shallow(<GlyphDiamond... |
7,690 | 0 | petrpan-code/airbnb/visx/packages/visx-glyph | petrpan-code/airbnb/visx/packages/visx-glyph/test/Dot.test.tsx | import { GlyphDot } from '../src';
describe('<GlyphDot />', () => {
test('it should be defined', () => {
expect(GlyphDot).toBeDefined();
});
});
|
7,691 | 0 | petrpan-code/airbnb/visx/packages/visx-glyph | petrpan-code/airbnb/visx/packages/visx-glyph/test/Glyph.test.tsx | import React from 'react';
import { shallow, render } from 'enzyme';
import { Glyph } from '../src';
describe('<Glyph />', () => {
test('it should be defined', () => {
expect(Glyph).toBeDefined();
});
test('it should be wrapped in a <Glyph />', () => {
const wrapper = shallow(<Glyph />);
expect(wra... |
7,692 | 0 | petrpan-code/airbnb/visx/packages/visx-glyph | petrpan-code/airbnb/visx/packages/visx-glyph/test/Square.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { GlyphSquare } from '../src';
describe('<GlyphSquare />', () => {
test('it should be defined', () => {
expect(GlyphSquare).toBeDefined();
});
test('it should be wrapped in a <Glyph />', () => {
const wrapper = shallow(<GlyphSquare />)... |
7,693 | 0 | petrpan-code/airbnb/visx/packages/visx-glyph | petrpan-code/airbnb/visx/packages/visx-glyph/test/Star.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { GlyphStar } from '../src';
describe('<GlyphStar />', () => {
test('it should be defined', () => {
expect(GlyphStar).toBeDefined();
});
test('it should be wrapped in a <Glyph />', () => {
const wrapper = shallow(<GlyphStar />);
ex... |
7,694 | 0 | petrpan-code/airbnb/visx/packages/visx-glyph | petrpan-code/airbnb/visx/packages/visx-glyph/test/Triangle.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { GlyphTriangle } from '../src';
describe('<GlyphTriangle />', () => {
test('it should be defined', () => {
expect(GlyphTriangle).toBeDefined();
});
test('it should be wrapped in a <Glyph />', () => {
const wrapper = shallow(<GlyphTria... |
7,695 | 0 | petrpan-code/airbnb/visx/packages/visx-glyph | petrpan-code/airbnb/visx/packages/visx-glyph/test/Wye.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { GlyphWye } from '../src';
describe('<GlyphWye />', () => {
test('it should be defined', () => {
expect(GlyphWye).toBeDefined();
});
test('it should be wrapped in a <Glyph />', () => {
const wrapper = shallow(<GlyphWye />);
expect... |
7,696 | 0 | petrpan-code/airbnb/visx/packages/visx-glyph | petrpan-code/airbnb/visx/packages/visx-glyph/test/tsconfig.json | {
"compilerOptions": {
"composite": false,
"emitDeclarationOnly": false,
"noEmit": true,
"rootDir": "."
},
"extends": "../../../tsconfig.options.json",
"include": ["**/*", "../types/**/*", "../../../types/**/*"],
"references": [
{
"path": ".."
}
]
}
|
7,714 | 0 | petrpan-code/airbnb/visx/packages/visx-gradient | petrpan-code/airbnb/visx/packages/visx-gradient/test/Gradients.test.tsx | import React from 'react';
import { render } from '@testing-library/react';
import {
GradientDarkgreenGreen,
GradientLightgreenGreen,
GradientOrangeRed,
GradientPinkBlue,
GradientPinkRed,
GradientPurpleOrange,
GradientPurpleRed,
GradientPurpleTeal,
GradientSteelPurple,
GradientTealBlue,
} from '../... |
7,715 | 0 | petrpan-code/airbnb/visx/packages/visx-gradient | petrpan-code/airbnb/visx/packages/visx-gradient/test/LinearGradient.test.tsx | import React from 'react';
import { render } from '@testing-library/react';
import { LinearGradient } from '../src';
describe('<LinearGradient />', () => {
test('it should be defined', () => {
expect(LinearGradient).toBeDefined();
});
test('it should render without crashing', () => {
expect(() =>
... |
7,716 | 0 | petrpan-code/airbnb/visx/packages/visx-gradient | petrpan-code/airbnb/visx/packages/visx-gradient/test/RadialGradient.test.tsx | import React from 'react';
import { render } from '@testing-library/react';
import { RadialGradient } from '../src';
describe('<RadialGradient />', () => {
test('it should be defined', () => {
expect(RadialGradient).toBeDefined();
});
test('it should render without crashing', () => {
expect(() =>
... |
7,717 | 0 | petrpan-code/airbnb/visx/packages/visx-gradient | petrpan-code/airbnb/visx/packages/visx-gradient/test/tsconfig.json | {
"compilerOptions": {
"composite": false,
"emitDeclarationOnly": false,
"noEmit": true,
"rootDir": "."
},
"extends": "../../../tsconfig.options.json",
"include": ["**/*", "../types/**/*", "../../../types/**/*"],
"references": [
{
"path": ".."
}
]
}
|
7,732 | 0 | petrpan-code/airbnb/visx/packages/visx-grid | petrpan-code/airbnb/visx/packages/visx-grid/test/Grid.test.tsx | import React from 'react';
import { render } from 'enzyme';
import { scaleLinear } from '@visx/scale';
import { Grid } from '../src';
describe('<Grid />', () => {
it('should be defined', () => {
expect(Grid).toBeDefined();
});
it('should create grid lines', () => {
const wrapper = render(
<Grid
... |
7,733 | 0 | petrpan-code/airbnb/visx/packages/visx-grid | petrpan-code/airbnb/visx/packages/visx-grid/test/GridAngle.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { Line } from '@visx/shape';
import { scaleLinear } from '@visx/scale';
import { GridAngle } from '../src';
import * as polarToCartesian from '../src/utils/polarToCartesian';
const gridProps = {
innerRadius: 0,
outerRadius: 10,
scale: scaleLine... |
7,734 | 0 | petrpan-code/airbnb/visx/packages/visx-grid | petrpan-code/airbnb/visx/packages/visx-grid/test/GridColumns.test.tsx | import React from 'react';
import { render } from 'enzyme';
import { scaleLinear } from '@visx/scale';
import { GridColumns } from '../src';
describe('<GridColumns />', () => {
it('should be defined', () => {
expect(GridColumns).toBeDefined();
});
it('should create grid lines', () => {
const wrapper = re... |
7,735 | 0 | petrpan-code/airbnb/visx/packages/visx-grid | petrpan-code/airbnb/visx/packages/visx-grid/test/GridPolar.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { scaleLinear } from '@visx/scale';
import { GridPolar, GridAngle, GridRadial } from '../src';
const gridProps = {
innerRadius: 0,
outerRadius: 10,
scaleAngle: scaleLinear({ range: [1, 100], domain: [1, 10] }),
scaleRadial: scaleLinear({ rang... |
7,736 | 0 | petrpan-code/airbnb/visx/packages/visx-grid | petrpan-code/airbnb/visx/packages/visx-grid/test/GridRadial.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { Arc } from '@visx/shape';
import { scaleLinear } from '@visx/scale';
import { GridRadial } from '../src';
const gridProps = {
innerRadius: 0,
outerRadius: 10,
scale: scaleLinear({ range: [1, 100], domain: [1, 10] }),
};
describe('<GridRadial... |
7,737 | 0 | petrpan-code/airbnb/visx/packages/visx-grid | petrpan-code/airbnb/visx/packages/visx-grid/test/GridRows.test.tsx | import React from 'react';
import { render } from 'enzyme';
import { scaleLinear } from '@visx/scale';
import { GridRows } from '../src';
describe('<GridRows />', () => {
it('should be defined', () => {
expect(GridRows).toBeDefined();
});
it('should create grid lines', () => {
const wrapper = render(
... |
7,738 | 0 | petrpan-code/airbnb/visx/packages/visx-grid | petrpan-code/airbnb/visx/packages/visx-grid/test/tsconfig.json | {
"compilerOptions": {
"composite": false,
"emitDeclarationOnly": false,
"noEmit": true,
"rootDir": "."
},
"extends": "../../../tsconfig.options.json",
"include": ["**/*", "../types/**/*", "../../../types/**/*"],
"references": [
{
"path": ".."
}
]
}
|
7,739 | 0 | petrpan-code/airbnb/visx/packages/visx-grid | petrpan-code/airbnb/visx/packages/visx-grid/test/utils.test.ts | import { scaleLinear, scaleBand } from '@visx/scale';
import polarToCartesian from '../src/utils/polarToCartesian';
import getScaleBandwidth from '../src/utils/getScaleBandwidth';
describe('grid utils', () => {
describe('polarToCartesian', () => {
const config = {
radius: 20,
angle: 20,
};
it... |
7,746 | 0 | petrpan-code/airbnb/visx/packages/visx-group | petrpan-code/airbnb/visx/packages/visx-group/test/Group.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { Group } from '../src';
describe('<Group />', () => {
test('it should be defined', () => {
expect(Group).toBeDefined();
});
test("it should have class='visx-group'", () => {
const wrapper = shallow(<Group />);
expect(wrapper.prop(... |
7,747 | 0 | petrpan-code/airbnb/visx/packages/visx-group | petrpan-code/airbnb/visx/packages/visx-group/test/tsconfig.json | {
"compilerOptions": {
"composite": false,
"emitDeclarationOnly": false,
"noEmit": true,
"rootDir": "."
},
"extends": "../../../tsconfig.options.json",
"include": ["**/*", "../types/**/*", "../../../types/**/*"],
"references": [
{
"path": ".."
}
]
}
|
7,756 | 0 | petrpan-code/airbnb/visx/packages/visx-heatmap | petrpan-code/airbnb/visx/packages/visx-heatmap/test/HeatmapCircle.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { HeatmapCircle } from '../src';
const data: {
bin: number;
bins: { bin: number; count: number }[];
}[] = [{ bin: 0, bins: [{ bin: 0, count: 1 }] }];
const xScale = () => 50;
const yScale = () => 50;
const HeatmapWrapper = (props = {}) =>
shal... |
7,757 | 0 | petrpan-code/airbnb/visx/packages/visx-heatmap | petrpan-code/airbnb/visx/packages/visx-heatmap/test/HeatmapRect.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { HeatmapRect } from '../src';
const data: {
bin: number;
bins: { bin: number; count: number }[];
}[] = [{ bin: 0, bins: [{ bin: 0, count: 1 }] }];
const xScale = () => 50;
const yScale = () => 50;
const HeatmapWrapper = (props = {}) =>
shall... |
7,758 | 0 | petrpan-code/airbnb/visx/packages/visx-heatmap | petrpan-code/airbnb/visx/packages/visx-heatmap/test/tsconfig.json | {
"compilerOptions": {
"composite": false,
"emitDeclarationOnly": false,
"noEmit": true,
"rootDir": "."
},
"extends": "../../../tsconfig.options.json",
"include": ["**/*", "../types/**/*", "../../../types/**/*"],
"references": [
{
"path": ".."
}
]
}
|
7,774 | 0 | petrpan-code/airbnb/visx/packages/visx-hierarchy | petrpan-code/airbnb/visx/packages/visx-hierarchy/test/Cluster.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { hierarchy } from 'd3-hierarchy';
import { Cluster } from '../src';
import { ClusterProps } from '../src/hierarchies/Cluster';
type Datum = { name: string; children: Datum[] };
const childrenFunc = jest.fn();
const mockHierarchy = hierarchy({
name... |
7,775 | 0 | petrpan-code/airbnb/visx/packages/visx-hierarchy | petrpan-code/airbnb/visx/packages/visx-hierarchy/test/Defaults.test.tsx | import {
HierarchyDefaultLink,
HierarchyDefaultNode,
HierarchyDefaultRectNode,
hierarchy,
stratify,
treemapBinary,
treemapDice,
treemapResquarify,
treemapSlice,
treemapSliceDice,
treemapSquarify,
} from '../src';
describe('<DefaultLink />', () => {
test('should be defined', () => {
expect(H... |
7,776 | 0 | petrpan-code/airbnb/visx/packages/visx-hierarchy | petrpan-code/airbnb/visx/packages/visx-hierarchy/test/Tree.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { hierarchy } from 'd3-hierarchy';
import { Tree } from '../src';
import { TreeProps } from '../src/hierarchies/Tree';
type Datum = { name: string; children: Datum[] };
const childrenFunc = jest.fn();
const mockHierarchy = hierarchy({
name: 'Eve',
... |
7,777 | 0 | petrpan-code/airbnb/visx/packages/visx-hierarchy | petrpan-code/airbnb/visx/packages/visx-hierarchy/test/tsconfig.json | {
"compilerOptions": {
"composite": false,
"emitDeclarationOnly": false,
"noEmit": true,
"rootDir": "."
},
"extends": "../../../tsconfig.options.json",
"include": ["**/*", "../types/**/*", "../../../types/**/*"],
"references": [
{
"path": ".."
}
]
}
|
7,801 | 0 | petrpan-code/airbnb/visx/packages/visx-legend | petrpan-code/airbnb/visx/packages/visx-legend/test/Legend.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { scaleLinear } from '@visx/scale';
import { Legend, LegendLabel } from '../src';
const defaultProps = {
scale: scaleLinear<number>({
range: [10, 0],
round: true,
domain: [0, 10],
}),
};
describe('<Legend />', () => {
test('it shou... |
7,802 | 0 | petrpan-code/airbnb/visx/packages/visx-legend | petrpan-code/airbnb/visx/packages/visx-legend/test/LegendLinear.test.tsx | import { LegendLinear } from '../src';
describe('<LegendLinear />', () => {
test('it should be defined', () => {
expect(LegendLinear).toBeDefined();
});
});
|
7,803 | 0 | petrpan-code/airbnb/visx/packages/visx-legend | petrpan-code/airbnb/visx/packages/visx-legend/test/LegendOrdinal.test.tsx | import { LegendOrdinal } from '../src';
describe('<LegendLOrdinal />', () => {
test('it should be defined', () => {
expect(LegendOrdinal).toBeDefined();
});
});
|
7,804 | 0 | petrpan-code/airbnb/visx/packages/visx-legend | petrpan-code/airbnb/visx/packages/visx-legend/test/LegendQuantile.test.tsx | import { LegendQuantile } from '../src';
describe('<LegendQuantile />', () => {
test('it should be defined', () => {
expect(LegendQuantile).toBeDefined();
});
});
|
7,805 | 0 | petrpan-code/airbnb/visx/packages/visx-legend | petrpan-code/airbnb/visx/packages/visx-legend/test/LegendSize.test.tsx | import { LegendSize } from '../src';
describe('<LegendSize />', () => {
test('it should be defined', () => {
expect(LegendSize).toBeDefined();
});
});
|
7,806 | 0 | petrpan-code/airbnb/visx/packages/visx-legend | petrpan-code/airbnb/visx/packages/visx-legend/test/LegendThreshold.test.tsx | import { LegendThreshold } from '../src';
describe('<LegendThreshold />', () => {
test('it should be defined', () => {
expect(LegendThreshold).toBeDefined();
});
});
|
7,807 | 0 | petrpan-code/airbnb/visx/packages/visx-legend | petrpan-code/airbnb/visx/packages/visx-legend/test/scales.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { scaleBand, scaleLinear, scaleOrdinal, scaleThreshold, scaleQuantile } from '@visx/scale';
import {
Legend,
LegendLinear,
LegendOrdinal,
LegendSize,
LegendThreshold,
LegendQuantile,
} from '../src';
describe('Legend scales', () => {
it... |
7,808 | 0 | petrpan-code/airbnb/visx/packages/visx-legend | petrpan-code/airbnb/visx/packages/visx-legend/test/tsconfig.json | {
"compilerOptions": {
"composite": false,
"emitDeclarationOnly": false,
"noEmit": true,
"rootDir": "."
},
"extends": "../../../tsconfig.options.json",
"include": ["**/*", "../types/**/*", "../../../types/**/*"],
"references": [
{
"path": ".."
}
]
}
|
7,820 | 0 | petrpan-code/airbnb/visx/packages/visx-marker | petrpan-code/airbnb/visx/packages/visx-marker/test/Arrow.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { MarkerArrow, Marker } from '../src';
const Wrapper = (restProps = {}) => shallow(<MarkerArrow id="marker-circle-test" {...restProps} />);
describe('<MarkerArrow />', () => {
test('it should be defined', () => {
expect(MarkerArrow).toBeDefined... |
7,821 | 0 | petrpan-code/airbnb/visx/packages/visx-marker | petrpan-code/airbnb/visx/packages/visx-marker/test/Circle.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { MarkerCircle, Marker } from '../src';
const Wrapper = (restProps = {}) =>
shallow(<MarkerCircle id="marker-circle-test" {...restProps} />);
describe('<MarkerCircle />', () => {
test('it should be defined', () => {
expect(MarkerCircle).toBeD... |
7,822 | 0 | petrpan-code/airbnb/visx/packages/visx-marker | petrpan-code/airbnb/visx/packages/visx-marker/test/Cross.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { MarkerCross, Marker } from '../src';
const Wrapper = (restProps = {}) => shallow(<MarkerCross id="marker-cross-test" {...restProps} />);
describe('<MarkerCross />', () => {
test('it should be defined', () => {
expect(MarkerCross).toBeDefined(... |
7,823 | 0 | petrpan-code/airbnb/visx/packages/visx-marker | petrpan-code/airbnb/visx/packages/visx-marker/test/Line.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { MarkerLine, Marker } from '../src';
const Wrapper = (restProps = {}) => shallow(<MarkerLine id="marker-line-test" {...restProps} />);
describe('<MarkerLine />', () => {
test('it should be defined', () => {
expect(MarkerLine).toBeDefined();
... |
7,824 | 0 | petrpan-code/airbnb/visx/packages/visx-marker | petrpan-code/airbnb/visx/packages/visx-marker/test/Marker.test.tsx | import { Marker } from '../src';
describe('<Marker />', () => {
test('it should be defined', () => {
expect(Marker).toBeDefined();
});
});
|
7,825 | 0 | petrpan-code/airbnb/visx/packages/visx-marker | petrpan-code/airbnb/visx/packages/visx-marker/test/X.test.tsx | import React from 'react';
import { shallow } from 'enzyme';
import { MarkerX, MarkerCross } from '../src';
const Wrapper = (restProps = {}) => shallow(<MarkerX id="marker-x-test" {...restProps} />);
describe('<MarkerX />', () => {
test('it should be defined', () => {
expect(MarkerX).toBeDefined();
});
tes... |
7,826 | 0 | petrpan-code/airbnb/visx/packages/visx-marker | petrpan-code/airbnb/visx/packages/visx-marker/test/tsconfig.json | {
"compilerOptions": {
"composite": false,
"emitDeclarationOnly": false,
"noEmit": true,
"rootDir": "."
},
"extends": "../../../tsconfig.options.json",
"include": ["**/*", "../types/**/*", "../../../types/**/*"],
"references": [
{
"path": ".."
}
]
}
|
7,849 | 0 | petrpan-code/airbnb/visx/packages/visx-mock-data | petrpan-code/airbnb/visx/packages/visx-mock-data/test/appleStock.test.ts | import { appleStock } from '../src';
describe('mocks/appleStock', () => {
test('it should be defined', () => {
expect(appleStock).toBeDefined();
});
test('it should be an array', () => {
expect(appleStock.length).toBeDefined();
});
test('it should return [{ date, close }]', () => {
const data =... |
7,850 | 0 | petrpan-code/airbnb/visx/packages/visx-mock-data | petrpan-code/airbnb/visx/packages/visx-mock-data/test/browserUsage.test.ts | import { browserUsage } from '../src';
describe('mocks/browserUsage', () => {
test('it should be defined', () => {
expect(browserUsage).toBeDefined();
});
test('it should be an array', () => {
expect(browserUsage.length).toBeDefined();
});
test('it should return [{ date, browser names }]', () => {
... |
7,851 | 0 | petrpan-code/airbnb/visx/packages/visx-mock-data | petrpan-code/airbnb/visx/packages/visx-mock-data/test/cityTemperature.test.ts | import { cityTemperature } from '../src';
describe('mocks/cityTemperature', () => {
test('it should be defined', () => {
expect(cityTemperature).toBeDefined();
});
test('it should be an array', () => {
expect(cityTemperature.length).toBeDefined();
});
test('it should return [{ date, city names }]',... |
7,852 | 0 | petrpan-code/airbnb/visx/packages/visx-mock-data | petrpan-code/airbnb/visx/packages/visx-mock-data/test/genBin.test.ts | import { genBin, getSeededRandom } from '../src';
describe('generators/genBin', () => {
it('should be defined', () => {
expect(genBin).toBeDefined();
});
it('should have shape [{ bin, count }]', () => {
const bin = genBin(1);
expect(bin).toHaveLength(1);
expect(bin[0].bin).toBeDefined();
exp... |
7,853 | 0 | petrpan-code/airbnb/visx/packages/visx-mock-data | petrpan-code/airbnb/visx/packages/visx-mock-data/test/genBins.test.ts | import { genBins, getSeededRandom } from '../src';
describe('generators/genBins', () => {
it('should be defined', () => {
expect(genBins).toBeDefined();
});
it('should have the shape of [{bin, bins: [{ bin, count }]}]', () => {
const bins = genBins(1, 2);
expect(bins[0].bin).toBe(0);
expect(bins... |
7,854 | 0 | petrpan-code/airbnb/visx/packages/visx-mock-data | petrpan-code/airbnb/visx/packages/visx-mock-data/test/genDateValue.test.ts | import { genDateValue } from '../src';
describe('generators/genDateValue', () => {
it('should be defined', () => {
expect(genDateValue).toBeDefined();
});
it('should be function', () => {
expect(typeof genDateValue).toBe('function');
});
it('should return a array of n', () => {
const n = 3;
... |
7,855 | 0 | petrpan-code/airbnb/visx/packages/visx-mock-data | petrpan-code/airbnb/visx/packages/visx-mock-data/test/genPhyllotaxis.test.ts | import { genPhyllotaxis } from '../src';
describe('generators/genPhyllotaxis', () => {
test('it should be defined', () => {
expect(genPhyllotaxis).toBeDefined();
});
test('it should return a function', () => {
const pointFn = genPhyllotaxis({
radius: 10,
width: 200,
height: 200,
})... |
7,856 | 0 | petrpan-code/airbnb/visx/packages/visx-mock-data | petrpan-code/airbnb/visx/packages/visx-mock-data/test/genRandomNormalPoints.test.ts | import { genRandomNormalPoints } from '../src';
describe('generators/genRandomNormalPoints', () => {
it('should be defined', () => {
expect(genRandomNormalPoints).toBeDefined();
});
it('should be function', () => {
expect(typeof genRandomNormalPoints).toBe('function');
});
it('should default to 3x3... |
7,857 | 0 | petrpan-code/airbnb/visx/packages/visx-mock-data | petrpan-code/airbnb/visx/packages/visx-mock-data/test/genStats.test.ts | import { genStats, getSeededRandom } from '../src';
describe('generators/genStats', () => {
it('should be defined', () => {
expect(genStats).toBeDefined();
});
it('should have boxPlot and binData', () => {
const data = genStats(2);
expect(data.length).toBeDefined();
expect(data).toHaveLength(2);... |
7,858 | 0 | petrpan-code/airbnb/visx/packages/visx-mock-data | petrpan-code/airbnb/visx/packages/visx-mock-data/test/getSeededRandom.test.ts | import { getSeededRandom } from '../src';
describe('generators/getSeededRandom', () => {
it('should be defined', () => {
expect(getSeededRandom).toBeDefined();
});
it('should return a random number generator that returns the same value given the same seed', () => {
const random1 = getSeededRandom(0.5)()... |
7,859 | 0 | petrpan-code/airbnb/visx/packages/visx-mock-data | petrpan-code/airbnb/visx/packages/visx-mock-data/test/groupDateValue.test.ts | import { groupDateValue } from '../src';
describe('mocks/groupDateValue', () => {
test('it should be defined', () => {
expect(groupDateValue).toBeDefined();
});
test('it should be an array', () => {
expect(groupDateValue.length).toBeDefined();
});
test('it should return [{ key, value, date }]', () ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.