level_0 int64 0 10k | index int64 0 0 | repo_id stringlengths 22 152 | file_path stringlengths 41 203 | content stringlengths 11 11.5M |
|---|---|---|---|---|
5,363 | 0 | petrpan-code/shuding/nextra/packages/nextra | petrpan-code/shuding/nextra/packages/nextra/__test__/utils.test.ts | import { parseFileName } from '../src/utils'
describe('Utils', () => {
describe('parseFileName()', () => {
describe('extension', () => {
it('parse different extensions', () => {
expect(parseFileName('./foo.bar.baz-qux.zh-CN.js')).toEqual({
name: 'foo.bar.baz-qux',
locale: 'zh-CN... |
5,364 | 0 | petrpan-code/shuding/nextra/packages/nextra/__test__ | petrpan-code/shuding/nextra/packages/nextra/__test__/__snapshots__/compile.test.ts.snap | // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`Process heading > code-h1 1`] = `
{
"frontMatter": {},
"result": "/*@jsxRuntime automatic @jsxImportSource react*/
import {useMDXComponents as _provideComponents} from \\"nextra/mdx\\";
export const __toc = [];
function _createMdxContent(props)... |
5,365 | 0 | petrpan-code/shuding/nextra/packages/nextra/__test__ | petrpan-code/shuding/nextra/packages/nextra/__test__/__snapshots__/context.test.ts.snap | // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`context > getAllPages() > should work 1`] = `
[
{
"kind": "MdxPage",
"meta": {
"theme": {
"timestamp": false,
"typesetting": "article",
},
"type": "page",
},
"name": "404",
"route": "/404",
... |
5,367 | 0 | petrpan-code/shuding/nextra/packages/nextra/__test__ | petrpan-code/shuding/nextra/packages/nextra/__test__/__snapshots__/page-map.test.ts.snap | // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`Page Process > pageMap en-US 1`] = `
[
[
{
"kind": "MdxPage",
"name": "404",
"route": "/404",
},
{
"kind": "MdxPage",
"name": "500",
"route": "/500",
},
{
"data": {
"404": {
... |
5,860 | 0 | petrpan-code/benawad/dogehouse/kebab/src | petrpan-code/benawad/dogehouse/kebab/src/util/ast.test.ts | import { tokensToString, stringToToken } from "./ast";
test("to tokens", () => {
expect(stringToToken("abcd")).toEqual([{ t: "text", v: "abcd" }]);
});
test("to string", () => {
expect(tokensToString([{ t: "text", v: "abcd" }])).toEqual("abcd");
expect(tokensToString([{ t: "nonexistent-type", v: "abcd" }])).toE... |
6,075 | 0 | petrpan-code/benawad/dogehouse/kibbeh/src/lib | petrpan-code/benawad/dogehouse/kibbeh/src/lib/tests/constants.test.ts | import { linkRegex } from "../constants";
describe("Link Regex", () => {
test("Only Link", () => {
const msg1 = "https://abc.com";
expect(linkRegex.test(msg1)).toBeTruthy();
});
test("Link between text", () => {
const msg2 = "some text https://abc.com other text";
expect(linkRegex.test(msg2)).... |
6,076 | 0 | petrpan-code/benawad/dogehouse/kibbeh/src/lib | petrpan-code/benawad/dogehouse/kibbeh/src/lib/tests/kFormatter.test.ts | import { kFormatter } from "../kFormatter";
describe("Number formatter", () => {
it("should return 1", () => {
expect(kFormatter(1)).toBe("1");
});
it("should return 1k", () => {
expect(kFormatter(1000)).toBe("1k");
});
it("should return 3.8k", () => {
expect(kFormatter(3821)).toBe("3.8k");
}... |
7,302 | 0 | petrpan-code/timolins/react-hot-toast | petrpan-code/timolins/react-hot-toast/test/toast.test.tsx | import React from 'react';
import {
render,
screen,
act,
waitFor,
fireEvent,
} from '@testing-library/react';
import toast, { resolveValue, Toaster, ToastIcon } from '../src';
import { TOAST_EXPIRE_DISMISS_DELAY, defaultTimeouts } from '../src/core/store';
beforeEach(() => {
// Tests should run in serial ... |
7,548 | 0 | petrpan-code/uber/baseweb/documentation-site/components/yard | petrpan-code/uber/baseweb/documentation-site/components/yard/__tests__/ast.test.ts | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import { parseOverrides } from '../custom-props';
import { toggleOverrideSharedProps } from '../ast';
describe('parseOverrides', () => {
test('get over... |
7,549 | 0 | petrpan-code/uber/baseweb/documentation-site/components/yard | petrpan-code/uber/baseweb/documentation-site/components/yard/__tests__/code-generator.test.ts | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
//@ts-ignore
import { getAstPropValue, getCode } from 'react-view/dist/lib/code-generator';
import { PropTypes } from 'react-view';
import generate from '... |
8,370 | 0 | petrpan-code/uber/baseweb/packages/baseweb-vscode-extension/ext-src/test | petrpan-code/uber/baseweb/packages/baseweb-vscode-extension/ext-src/test/suite/extension.test.ts | import * as assert from 'assert';
// You can import and use all API from the 'vscode' module
// as well as import your extension to test it
import * as vscode from 'vscode';
// import * as myExtension from '../extension';
suite('Extension Test Suite', () => {
vscode.window.showInformationMessage('Start all tests.')... |
8,468 | 0 | petrpan-code/uber/baseweb/src/accordion | petrpan-code/uber/baseweb/src/accordion/__tests__/accordion.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, fireEvent, getByText, getByTestId, queryAllByText } from '@testing-library/react';
import { Accordion, Pa... |
8,469 | 0 | petrpan-code/uber/baseweb/src/accordion | petrpan-code/uber/baseweb/src/accordion/__tests__/panel.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, fireEvent, getByText } from '@testing-library/react';
import { Panel } from '..';
describe('Panel', () =... |
8,470 | 0 | petrpan-code/uber/baseweb/src/accordion | petrpan-code/uber/baseweb/src/accordion/__tests__/stateful-panel-container.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render } from '@testing-library/react';
import { StatefulPanelContainer } from '..';
describe('StatefulPanelCont... |
8,497 | 0 | petrpan-code/uber/baseweb/src/app-nav-bar | petrpan-code/uber/baseweb/src/app-nav-bar/__tests__/utils.test.ts | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import { setItemActive } from '..';
describe('setItemActive', () => {
it('sets specified item active', () => {
const items = [{ label: 'one' }, { la... |
8,522 | 0 | petrpan-code/uber/baseweb/src/avatar | petrpan-code/uber/baseweb/src/avatar/__tests__/avatar.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, fireEvent, getByText } from '@testing-library/react';
import { Avatar } from '..';
// manually trigger s... |
8,523 | 0 | petrpan-code/uber/baseweb/src/avatar | petrpan-code/uber/baseweb/src/avatar/__tests__/styled-component.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
/* eslint-disable */
import * as React from 'react';
import { StyledInitials, StyledRoot, Avatar } from '..';
describe('Avatar styled Components flow', ()... |
8,561 | 0 | petrpan-code/uber/baseweb/src/banner | petrpan-code/uber/baseweb/src/banner/__tests__/banner.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, fireEvent, getByLabelText, getByText } from '@testing-library/react';
import { Banner, ACTION_POSITION } ... |
8,572 | 0 | petrpan-code/uber/baseweb/src/block | petrpan-code/uber/baseweb/src/block/__tests__/block.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, fireEvent } from '@testing-library/react';
import Block from '../block';
describe('Block', () => {
it... |
8,598 | 0 | petrpan-code/uber/baseweb/src/breadcrumbs | petrpan-code/uber/baseweb/src/breadcrumbs/__tests__/breadcrumbs.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, queryAllByTestId } from '@testing-library/react';
import { StyledLink } from '../../link';
import { Brea... |
8,635 | 0 | petrpan-code/uber/baseweb/src/button-group | petrpan-code/uber/baseweb/src/button-group/__tests__/button-group.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, fireEvent } from '@testing-library/react';
import { Button } from '../../button';
import { ButtonGroup }... |
8,636 | 0 | petrpan-code/uber/baseweb/src/button-group | petrpan-code/uber/baseweb/src/button-group/__tests__/stateful-button-group.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, fireEvent } from '@testing-library/react';
import { Button } from '../../button';
import { StatefulButto... |
8,637 | 0 | petrpan-code/uber/baseweb/src/button-group | petrpan-code/uber/baseweb/src/button-group/__tests__/stateful-container.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, fireEvent } from '@testing-library/react';
import { StatefulContainer, MODE } from '..';
describe('Butto... |
8,647 | 0 | petrpan-code/uber/baseweb/src/button-timed | petrpan-code/uber/baseweb/src/button-timed/__tests__/button-timed.test.tsx | import * as React from 'react';
import { render, act } from '@testing-library/react';
import '@testing-library/jest-dom';
import { ButtonTimed } from '..';
jest.useFakeTimers();
describe('<ButtonTimed />', () => {
let onClickProp;
beforeEach(() => {
onClickProp = jest.fn();
});
it('should start the coun... |
8,668 | 0 | petrpan-code/uber/baseweb/src/button | petrpan-code/uber/baseweb/src/button/__tests__/button-in-form.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
/* eslint-disable */
import React from 'react';
import { render, fireEvent } from '@testing-library/react';
import Button from '../button';
test('Clickin... |
8,676 | 0 | petrpan-code/uber/baseweb/src/button | petrpan-code/uber/baseweb/src/button/__tests__/button.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, fireEvent, getByText } from '@testing-library/react';
import { Button } from '..';
describe('Button Com... |
8,693 | 0 | petrpan-code/uber/baseweb/src/card | petrpan-code/uber/baseweb/src/card/__tests__/card.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render } from '@testing-library/react';
import { Card } from '..';
const headerImg = 'example.com/header-img';
c... |
8,720 | 0 | petrpan-code/uber/baseweb/src/checkbox | petrpan-code/uber/baseweb/src/checkbox/__tests__/checkbox.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
/* eslint-env node */
import * as React from 'react';
import { render, fireEvent, getByText } from '@testing-library/react';
import { Checkbox } from '..... |
8,721 | 0 | petrpan-code/uber/baseweb/src/checkbox | petrpan-code/uber/baseweb/src/checkbox/__tests__/stateful-checkbox-container.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, fireEvent } from '@testing-library/react';
import { StatefulContainer } from '..';
describe('Stateful co... |
8,743 | 0 | petrpan-code/uber/baseweb/src/combobox | petrpan-code/uber/baseweb/src/combobox/__tests__/combobox.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import { act } from 'react-dom/test-utils';
import { render, fireEvent } from '@testing-library/react';
import { TestBaseProvid... |
8,787 | 0 | petrpan-code/uber/baseweb/src/data-table | petrpan-code/uber/baseweb/src/data-table/__tests__/column-anchor.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import { render } from '@testing-library/react';
import { AnchorColumn } from '..';
describe('anchor column', () => {
it('is... |
8,788 | 0 | petrpan-code/uber/baseweb/src/data-table | petrpan-code/uber/baseweb/src/data-table/__tests__/column-boolean.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import { render, fireEvent } from '@testing-library/react';
import { BooleanColumn } from '..';
describe('boolean column', () ... |
8,789 | 0 | petrpan-code/uber/baseweb/src/data-table | petrpan-code/uber/baseweb/src/data-table/__tests__/column-categorical.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import { render, fireEvent } from '@testing-library/react';
import { CategoricalColumn } from '..';
describe('categorical colu... |
8,790 | 0 | petrpan-code/uber/baseweb/src/data-table | petrpan-code/uber/baseweb/src/data-table/__tests__/column-custom.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import { render } from '@testing-library/react';
import { CustomColumn } from '..';
describe('custom column', () => {
it('is... |
8,791 | 0 | petrpan-code/uber/baseweb/src/data-table | petrpan-code/uber/baseweb/src/data-table/__tests__/column-datetime.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import { render, fireEvent } from '@testing-library/react';
import isEqual from 'date-fns/isEqual/index.js';
import isSameDay fr... |
8,792 | 0 | petrpan-code/uber/baseweb/src/data-table | petrpan-code/uber/baseweb/src/data-table/__tests__/column-numerical.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import { render, fireEvent } from '@testing-library/react';
import { NumericalColumn, NUMERICAL_FORMATS } from '..';
describe(... |
8,793 | 0 | petrpan-code/uber/baseweb/src/data-table | petrpan-code/uber/baseweb/src/data-table/__tests__/column-string.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import { render } from '@testing-library/react';
import { StringColumn } from '..';
describe('string column', () => {
it('is... |
8,844 | 0 | petrpan-code/uber/baseweb/src/data-table | petrpan-code/uber/baseweb/src/data-table/__tests__/data-table.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, fireEvent, getAllByRole, getByText } from '@testing-library/react';
import { TestBaseProvider } from '../... |
8,847 | 0 | petrpan-code/uber/baseweb/src/data-table | petrpan-code/uber/baseweb/src/data-table/__tests__/text-search.test.ts | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import { splitByQuery } from '../text-search';
describe('data-table text search', () => {
it('splitByQuery handles alphabet characters', () => {
con... |
8,883 | 0 | petrpan-code/uber/baseweb/src/datepicker | petrpan-code/uber/baseweb/src/datepicker/__tests__/calendar.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, getByTestId, fireEvent, queryByTestId, getByText } from '@testing-library/react';
import { TestBaseProvide... |
8,909 | 0 | petrpan-code/uber/baseweb/src/datepicker | petrpan-code/uber/baseweb/src/datepicker/__tests__/datepicker.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import MockDate from 'mockdate';
import {
render,
fireEvent,
getByTestId,
getAllByTestId,
queryByTestId,
queryA... |
8,916 | 0 | petrpan-code/uber/baseweb/src/datepicker | petrpan-code/uber/baseweb/src/datepicker/__tests__/stateful-calendar.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, getByTestId } from '@testing-library/react';
import { StatefulCalendar } from '..';
describe('StatefulCa... |
8,917 | 0 | petrpan-code/uber/baseweb/src/datepicker | petrpan-code/uber/baseweb/src/datepicker/__tests__/stateful-container.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render } from '@testing-library/react';
import { StatefulContainer } from '..';
describe('StatefulComponentContai... |
8,923 | 0 | petrpan-code/uber/baseweb/src/datepicker | petrpan-code/uber/baseweb/src/datepicker/__tests__/stateful-datepicker.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, getByTestId } from '@testing-library/react';
import { StatefulDatepicker } from '..';
describe('StatefulD... |
8,926 | 0 | petrpan-code/uber/baseweb/src/datepicker | petrpan-code/uber/baseweb/src/datepicker/__tests__/utils.test.ts | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
/* eslint-disable import/extensions */
// @ts-ignore
import { es } from 'date-fns/locale/index.js';
import * as utilsHelpers from '../utils';
import { form... |
8,972 | 0 | petrpan-code/uber/baseweb/src/dnd-list | petrpan-code/uber/baseweb/src/dnd-list/__tests__/list.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, getAllByTestId } from '@testing-library/react';
import { List } from '..';
describe('List', () => {
co... |
8,973 | 0 | petrpan-code/uber/baseweb/src/dnd-list | petrpan-code/uber/baseweb/src/dnd-list/__tests__/stateful-list-container.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { act } from 'react-dom/test-utils';
import { render } from '@testing-library/react';
import { StatefulListContainer... |
8,974 | 0 | petrpan-code/uber/baseweb/src/dnd-list | petrpan-code/uber/baseweb/src/dnd-list/__tests__/stateful-list.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, getByTestId } from '@testing-library/react';
import { StatefulList } from '..';
describe('StatefulList', ... |
8,996 | 0 | petrpan-code/uber/baseweb/src/drawer | petrpan-code/uber/baseweb/src/drawer/__tests__/drawer.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
/* eslint-env browser */
import * as React from 'react';
import { render, fireEvent, getByTestId, queryByText } from '@testing-library/react';
import { Dr... |
9,016 | 0 | petrpan-code/uber/baseweb/src/file-uploader | petrpan-code/uber/baseweb/src/file-uploader/__tests__/file-uploader.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import {
render,
getByRole,
getByTestId,
getByText,
queryByRole,
queryByTestId,
queryAllByRole,
} from '@test... |
9,026 | 0 | petrpan-code/uber/baseweb/src/flex-grid | petrpan-code/uber/baseweb/src/flex-grid/__tests__/flex-grid-item.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render } from '@testing-library/react';
import FlexGridItem, {
flexGridItemMediaQueryStyle,
flexGridItemStyle... |
9,033 | 0 | petrpan-code/uber/baseweb/src/flex-grid | petrpan-code/uber/baseweb/src/flex-grid/__tests__/flex-grid.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, prettyDOM } from '@testing-library/react';
import FlexGrid from '../flex-grid';
import { camelToKebab } f... |
9,034 | 0 | petrpan-code/uber/baseweb/src/flex-grid/__tests__ | petrpan-code/uber/baseweb/src/flex-grid/__tests__/__snapshots__/flex-grid-item.test.tsx.snap | // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`FlexGridItem flexGridItemMediaQueryStyle: 2 columns no gaps 1`] = `
Object {
"marginBottom": 0,
"marginRight": 0,
"width": "calc((100% - 0px) / 2 - .5px)",
}
`;
exports[`FlexGridItem flexGridItemMediaQueryStyle: 2 columns with gaps 1`] = `
Object {
"marginBo... |
9,035 | 0 | petrpan-code/uber/baseweb/src/flex-grid/__tests__ | petrpan-code/uber/baseweb/src/flex-grid/__tests__/__snapshots__/flex-grid.test.tsx.snap | // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`FlexGrid passes FlexGrid props to children: FlexGridItem with flexGridColumnCount 1`] = `
"[36m<body>[39m
[36m<div>[39m
[36m<div[39m
[33mdata-baseweb[39m=[32m\\"flex-grid\\"[39m
[33mstyled-component[39m=[32m\\"true\\"[39m
[33mte... |
9,048 | 0 | petrpan-code/uber/baseweb/src/form-control | petrpan-code/uber/baseweb/src/form-control/__tests__/form-control.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, getByTestId, getByText, queryByText } from '@testing-library/react';
import FormControl from '../form-con... |
9,064 | 0 | petrpan-code/uber/baseweb/src/header-navigation | petrpan-code/uber/baseweb/src/header-navigation/__tests__/header-navigation.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, getByTestId, getByText } from '@testing-library/react';
import { HeaderNavigation } from '..';
describe(... |
9,075 | 0 | petrpan-code/uber/baseweb/src/heading | petrpan-code/uber/baseweb/src/heading/__tests__/heading.test.ts | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import * as React from 'react';
// import {render} from '@testing-library/react';
// import ... |
9,109 | 0 | petrpan-code/uber/baseweb/src/helpers | petrpan-code/uber/baseweb/src/helpers/__tests__/i18n-interpolation.test.ts | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import getInterpolatedString from '../i18n-interpolation';
describe('Inserts interpolations correctly', () => {
test('i18n-interpolation', () => {
c... |
9,111 | 0 | petrpan-code/uber/baseweb/src/helpers | petrpan-code/uber/baseweb/src/helpers/__tests__/overrides.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render } from '@testing-library/react';
import {
getOverride,
getOverrideProps,
getOverrides,
mergeConfig... |
9,112 | 0 | petrpan-code/uber/baseweb/src/helpers | petrpan-code/uber/baseweb/src/helpers/__tests__/react-helpers.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { flattenFragments } from '../react-helpers';
describe('Helpers - ReactHelpers', () => {
test('flattenFragments'... |
9,113 | 0 | petrpan-code/uber/baseweb/src/helpers | petrpan-code/uber/baseweb/src/helpers/__tests__/responsive-helpers.test.ts | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import {
getMediaQueries,
getMediaQuery,
getMinimumPageMargins,
getMediaQueryPageMargins,
} from '../responsive-helpers';
describe('Helpers - Resp... |
9,114 | 0 | petrpan-code/uber/baseweb/src/helpers | petrpan-code/uber/baseweb/src/helpers/__tests__/strings.test.ts | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import { camelToKebab } from '../strings';
describe('Helpers - Strings', () => {
test('camelToKebab', () => {
expect(camelToKebab('testString')).toE... |
9,115 | 0 | petrpan-code/uber/baseweb/src/helpers/__tests__ | petrpan-code/uber/baseweb/src/helpers/__tests__/__snapshots__/overrides.test.tsx.snap | // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Helpers - Overrides getOverrideProps: returns correct object when override has props and styles 1`] = `
Object {
"$style": Object {
"color": "blue",
},
"propName": "propsValue",
}
`;
exports[`Helpers - Overrides getOverrideProps: returns correct object whe... |
9,116 | 0 | petrpan-code/uber/baseweb/src/helpers/__tests__ | petrpan-code/uber/baseweb/src/helpers/__tests__/__snapshots__/react-helpers.test.tsx.snap | // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Helpers - ReactHelpers flattenFragments: no wrapper 1`] = `
Array [
<li>
Item 1
</li>,
<li>
Item 2
</li>,
]
`;
exports[`Helpers - ReactHelpers flattenFragments: with wrapper 1`] = `
Array [
<Wrapper>
<li>
Item 1
</li>
</Wrapper>,
... |
9,203 | 0 | petrpan-code/uber/baseweb/src/icon | petrpan-code/uber/baseweb/src/icon/__tests__/icon.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
/* eslint-env browser */
import * as React from 'react';
import { render } from '@testing-library/react';
import { Icon } from '..';
import * as Icons fro... |
9,257 | 0 | petrpan-code/uber/baseweb/src/input | petrpan-code/uber/baseweb/src/input/__tests__/base-input.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, fireEvent } from '@testing-library/react';
import { BaseInput } from '..';
describe('base-input', () => ... |
9,276 | 0 | petrpan-code/uber/baseweb/src/input | petrpan-code/uber/baseweb/src/input/__tests__/input.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, fireEvent, getByText } from '@testing-library/react';
import { Input } from '..';
describe('input', () =... |
9,277 | 0 | petrpan-code/uber/baseweb/src/input | petrpan-code/uber/baseweb/src/input/__tests__/masked-input.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, fireEvent } from '@testing-library/react';
import { MaskedInput } from '..';
describe('masked-input', ()... |
9,278 | 0 | petrpan-code/uber/baseweb/src/input | petrpan-code/uber/baseweb/src/input/__tests__/stateful-container.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { act } from 'react-dom/test-utils';
import { render } from '@testing-library/react';
import { StatefulContainer } f... |
9,279 | 0 | petrpan-code/uber/baseweb/src/input | petrpan-code/uber/baseweb/src/input/__tests__/stateful-input.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, fireEvent } from '@testing-library/react';
import { StatefulInput } from '..';
describe('stateful-input',... |
9,280 | 0 | petrpan-code/uber/baseweb/src/input | petrpan-code/uber/baseweb/src/input/__tests__/utils.test.ts | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import { getSharedProps } from '../utils';
import { ADJOINED, SIZE } from '..';
test('Utils - getSharedProps', () => {
const props = {
id: 'id',
... |
9,281 | 0 | petrpan-code/uber/baseweb/src/input/__tests__ | petrpan-code/uber/baseweb/src/input/__tests__/__snapshots__/utils.test.ts.snap | // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Utils - getSharedProps: getSharedProps returns correct object 1`] = `
Object {
"$adjoined": "none",
"$disabled": false,
"$error": false,
"$isFocused": true,
"$isReadOnly": false,
"$positive": false,
"$required": false,
"$resize": undefined,
"$size":... |
9,300 | 0 | petrpan-code/uber/baseweb/src/layer | petrpan-code/uber/baseweb/src/layer/__tests__/layer.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, getByTestId, getByText, fireEvent } from '@testing-library/react';
import { TestBaseProvider } from '../.... |
9,301 | 0 | petrpan-code/uber/baseweb/src/layer | petrpan-code/uber/baseweb/src/layer/__tests__/tether.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, getByText } from '@testing-library/react';
import { TetherBehavior } from '..';
describe('TetherBehavior... |
9,302 | 0 | petrpan-code/uber/baseweb/src/layer | petrpan-code/uber/baseweb/src/layer/__tests__/utils.test.ts | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import { toPopperPlacement, parsePopperOffset } from '../utils';
describe('toPopperPlacement', () => {
test('toPopperPlacement should convert from popov... |
9,360 | 0 | petrpan-code/uber/baseweb/src/list | petrpan-code/uber/baseweb/src/list/__tests__/list-item.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render } from '@testing-library/react';
import ListItem from '../list-item';
import { Button } from '../../button... |
9,372 | 0 | petrpan-code/uber/baseweb/src/locale | petrpan-code/uber/baseweb/src/locale/__tests__/locale-provider.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import { render } from '@testing-library/react';
import LocaleProvider, { LocaleContext } from '../index';
import en_US from '..... |
9,439 | 0 | petrpan-code/uber/baseweb/src/menu | petrpan-code/uber/baseweb/src/menu/__tests__/maybe-child-menu.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, getByTestId, getByText } from '@testing-library/react';
import { TestBaseProvider } from '../../test/test... |
9,455 | 0 | petrpan-code/uber/baseweb/src/menu | petrpan-code/uber/baseweb/src/menu/__tests__/menu.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, getAllByTestId } from '@testing-library/react';
import Menu from '../menu';
const mockItems = [{ label: ... |
9,456 | 0 | petrpan-code/uber/baseweb/src/menu | petrpan-code/uber/baseweb/src/menu/__tests__/option-list.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, getByTestId } from '@testing-library/react';
import OptionList from '../option-list';
const mockItem = ... |
9,457 | 0 | petrpan-code/uber/baseweb/src/menu | petrpan-code/uber/baseweb/src/menu/__tests__/option-profile.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, getByTestId, getByText } from '@testing-library/react';
import OptionProfile from '../option-profile';
... |
9,458 | 0 | petrpan-code/uber/baseweb/src/menu | petrpan-code/uber/baseweb/src/menu/__tests__/stateful-container.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
/* eslint-env browser */
import * as React from 'react';
import { act } from 'react-dom/test-utils';
import { render } from '@testing-library/react';
impo... |
9,459 | 0 | petrpan-code/uber/baseweb/src/menu | petrpan-code/uber/baseweb/src/menu/__tests__/stateful-menu.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render } from '@testing-library/react';
import StatefulMenu from '../stateful-menu';
describe('Menu StatefulMenu... |
9,460 | 0 | petrpan-code/uber/baseweb/src/menu | petrpan-code/uber/baseweb/src/menu/__tests__/utils.test.ts | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as Utils from '../utils';
describe('Menu Utils - scrollItemIntoView', () => {
// |=======================| <-- top of parent window (at 0)
//... |
9,512 | 0 | petrpan-code/uber/baseweb/src/modal | petrpan-code/uber/baseweb/src/modal/__tests__/modal.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
/* eslint-env browser */
import * as React from 'react';
import { render, fireEvent, getByTestId, getByText, queryByText } from '@testing-library/react';
... |
9,519 | 0 | petrpan-code/uber/baseweb/src/notification | petrpan-code/uber/baseweb/src/notification/__tests__/notification.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { render, getByText } from '@testing-library/react';
import { Notification } from '..';
describe('Toast', () => {
... |
9,548 | 0 | petrpan-code/uber/baseweb/src/pagination | petrpan-code/uber/baseweb/src/pagination/__tests__/pagination.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
/* eslint-env browser */
import * as React from 'react';
import { render, getByTestId, getByText, fireEvent } from '@testing-library/react';
import Pagina... |
9,549 | 0 | petrpan-code/uber/baseweb/src/pagination | petrpan-code/uber/baseweb/src/pagination/__tests__/stateful-container.test.tsx | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
/* eslint-env browser */
import * as React from 'react';
import { act } from 'react-dom/test-utils';
import { render } from '@testing-library/react';
impo... |
9,550 | 0 | petrpan-code/uber/baseweb/src/pagination | petrpan-code/uber/baseweb/src/pagination/__tests__/utils.test.ts | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import { clamp } from '../utils';
describe('Pagination Utils', () => {
test('clamp', () => {
expect(clamp(1, 0, 2)).toEqual(1);
expect(clamp(1, ... |
9,569 | 0 | petrpan-code/uber/baseweb/src/payment-card | petrpan-code/uber/baseweb/src/payment-card/__tests__/payment-card.test.ts | /*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
//import * as React from 'react';
import { addGaps, sanitizeNumber, getCaretPosition } from '../utils';
test('add gaps to a string', () => {
expect(addG... |
1,169 | 0 | petrpan-code/NotionX/react-notion-x/packages/notion-client | petrpan-code/NotionX/react-notion-x/packages/notion-client/src/notion-api.test.ts | import test from 'ava'
import { NotionAPI } from './notion-api'
const pageIdFixturesSuccess = [
'067dd719-a912-471e-a9a3-ac10710e7fdf',
'067dd719a912471ea9a3ac10710e7fdf',
'https://www.notion.so/saasifysh/Embeds-5d4e290ca4604d8fb809af806a6c1749',
'https://www.notion.so/saasifysh/File-Uploads-34d650c65da34f888... |
1,183 | 0 | petrpan-code/NotionX/react-notion-x/packages/notion-compat | petrpan-code/NotionX/react-notion-x/packages/notion-compat/src/notion-compat-api.test.ts | import test from 'ava'
test('dummy', async (t) => {
t.truthy(true)
})
/*
TODO: this test currently fails because of an [esbuild issue](https://github.com/evanw/esbuild/issues/1921):
```
Uncaught exception in src/notion-compat-api.test.ts
Error: Dynamic require of "events" is not supported
› file:///Users/... |
1,202 | 0 | petrpan-code/NotionX/react-notion-x/packages/notion-utils/.snapshots | petrpan-code/NotionX/react-notion-x/packages/notion-utils/.snapshots/src/normalize-url.test.ts.md | # Snapshot report for `src/normalize-url.test.ts`
The actual snapshot is saved in `normalize-url.test.ts.snap`.
Generated by [AVA](https://avajs.dev).
## normalizeUrl valid
> Snapshot 1
'test.com'
> Snapshot 2
'test.com/123'
> Snapshot 3
'test.com'
> Snapshot 4
'test.com'
> Snapshot 5
'... |
1,203 | 0 | petrpan-code/NotionX/react-notion-x/packages/notion-utils/.snapshots | petrpan-code/NotionX/react-notion-x/packages/notion-utils/.snapshots/src/parse-page-id.test.ts.md | # Snapshot report for `src/parse-page-id.test.ts`
The actual snapshot is saved in `parse-page-id.test.ts.snap`.
Generated by [AVA](https://avajs.dev).
## utils.parsePageId non-uuid success
> Snapshot 1
'267c0d1f1df8457f9b5c8f7efca16d83'
> Snapshot 2
'267c0d1f1df8457f9b5c8f7efca16d83'
> Snapshot 3
'... |
1,303 | 0 | petrpan-code/NotionX/react-notion-x/packages/notion-utils | petrpan-code/NotionX/react-notion-x/packages/notion-utils/src/normalize-url.test.ts | import test from 'ava'
import { normalizeUrl } from './normalize-url'
test('normalizeUrl invalid', (t) => {
t.is(normalizeUrl(), '')
t.is(normalizeUrl(''), '')
t.is(normalizeUrl('#'), '')
t.is(normalizeUrl('#foo'), '')
t.is(normalizeUrl('/foo'), '')
t.is(normalizeUrl('/foo/bar'), '')
t.is(normalizeUrl('... |
1,305 | 0 | petrpan-code/NotionX/react-notion-x/packages/notion-utils | petrpan-code/NotionX/react-notion-x/packages/notion-utils/src/parse-page-id.test.ts | import test from 'ava'
import { parsePageId } from './parse-page-id'
const pageIdFixturesSuccess = [
'267c0d1f1df8457f9b5c8f7efca16d83',
'Twitter-Automation-Tool-267c0d1f1df8457f9b5c8f7efca16d83',
'www.notion.so/saasifysh/Twitter-Automation-Tool-267c0d1f1df8457f9b5c8f7efca16d83',
'www.notion.so/saasifysh/Twit... |
2,377 | 0 | petrpan-code/gitify-app/gitify/src | petrpan-code/gitify-app/gitify/src/components/AccountNotifications.test.tsx | import React from 'react';
import TestRendener from 'react-test-renderer';
import { AccountNotifications } from './AccountNotifications';
import { mockedGithubNotifications } from '../__mocks__/mockedData';
jest.mock('./Repository', () => ({
RepositoryNotifications: () => <div>Repository</div>,
}));
describe('comp... |
2,379 | 0 | petrpan-code/gitify-app/gitify/src | petrpan-code/gitify-app/gitify/src/components/AllRead.test.tsx | import * as React from 'react';
import * as TestRenderer from 'react-test-renderer';
import { mockMathRandom } from './test-utils';
import { AllRead } from './AllRead';
describe('components/all-read.tsx', function () {
// The read emoji randomly rotates, but then the snapshots would never match
// Have to make i... |
2,381 | 0 | petrpan-code/gitify-app/gitify/src | petrpan-code/gitify-app/gitify/src/components/Loading.test.tsx | import React from 'react';
import { render } from '@testing-library/react';
import NProgress from 'nprogress';
import { AppContext } from '../context/App';
import { Loading } from './Loading';
jest.mock('nprogress', () => {
return {
configure: jest.fn(),
start: jest.fn(),
done: jest.fn(),
remove: je... |
2,383 | 0 | petrpan-code/gitify-app/gitify/src | petrpan-code/gitify-app/gitify/src/components/Logo.test.tsx | import * as React from 'react';
import * as TestRenderer from 'react-test-renderer';
import { fireEvent, render } from '@testing-library/react';
import { Logo } from './Logo';
describe('components/ui/logo.tsx', () => {
it('renders correctly (light)', () => {
const tree = TestRenderer.create(<Logo />);
expe... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.