level_0
int64
0
10k
index
int64
0
0
repo_id
stringlengths
22
152
file_path
stringlengths
41
203
content
stringlengths
11
11.5M
2,248
0
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/__tests__
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/__tests__/__snapshots__/config.test.ts.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`loadSiteConfig website with .cjs siteConfig 1`] = ` { "siteConfig": { "baseUrl": "/", "baseUrlIssueBanner": true, "clientModules": [], "customFields": {}, "headTags": [], "i18n": { "defaultLocale": "en", "localeConfigs": {}, ...
2,249
0
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/__tests__
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/__tests__/__snapshots__/configValidation.test.ts.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`normalizeConfig should throw error if plugins is not a string and it's not an array #1 for the input of: [123] 1`] = ` " => Bad Docusaurus plugin value plugins[0]. Example valid plugin config: { plugins: [ ["@docusaurus/plugin-content-docs",options], "./myP...
2,250
0
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/__tests__
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/__tests__/__snapshots__/index.test.ts.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`load loads props for site with custom i18n path 1`] = ` { "baseUrl": "/", "codeTranslations": {}, "generatedFilesDir": "<PROJECT_ROOT>/packages/docusaurus/src/server/__tests__/__fixtures__/custom-i18n-site/.docusaurus", "headTags": "", "i18n": { "curren...
2,251
0
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/__tests__
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/__tests__/__snapshots__/routes.test.ts.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`handleDuplicateRoutes works 1`] = ` "Duplicate routes found! - Attempting to create page at /search, but a page already exists at this route. - Attempting to create page at /sameDoc, but a page already exists at this route. - Attempting to create page at /, but a pag...
2,260
0
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/plugins
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/plugins/__tests__/index.test.ts
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import path from 'path'; import {loadPlugins} from '..'; import type {Plugin, Props} from '@docusaurus/types'; describe('loadPlug...
2,261
0
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/plugins
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/plugins/__tests__/init.test.ts
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import path from 'path'; import {loadContext, type LoadContextOptions} from '../../index'; import {initPlugins} from '../init'; ...
2,262
0
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/plugins
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/plugins/__tests__/moduleShorthand.test.ts
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import {getNamePatterns, resolveModuleName} from '../moduleShorthand'; describe('getNamePatterns', () => { it('resolves plain n...
2,263
0
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/plugins
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/plugins/__tests__/pluginIds.test.ts
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import {ensureUniquePluginInstanceIds} from '../pluginIds'; import type {InitializedPlugin} from '@docusaurus/types'; function cr...
2,264
0
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/plugins
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/plugins/__tests__/presets.test.ts
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import path from 'path'; import {loadPresets} from '../presets'; import type {LoadContext} from '@docusaurus/types'; describe('lo...
2,265
0
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/plugins
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/plugins/__tests__/routeConfig.test.ts
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import {applyRouteTrailingSlash, sortConfig} from '../routeConfig'; import type {RouteConfig} from '@docusaurus/types'; import typ...
2,280
0
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/plugins/__tests__
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/plugins/__tests__/__snapshots__/index.test.ts.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`loadPlugins loads plugins 1`] = ` { "globalData": { "test1": { "default": { "content": "a", "prop": "a", }, }, }, "plugins": [ { "content": "a", "contentLoaded": [Function], "loadContent": [Function], ...
2,281
0
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/plugins/__tests__
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/plugins/__tests__/__snapshots__/init.test.ts.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`initPlugins throws user-friendly error message for plugins with bad values 1`] = ` " => Bad Docusaurus plugin value plugins[0]. Example valid plugin config: { plugins: [ ["@docusaurus/plugin-content-docs",options], "./myPlugin", ["./myPlugin",{someOptio...
2,282
0
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/plugins/__tests__
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/plugins/__tests__/__snapshots__/pluginIds.test.ts.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`ensureUniquePluginInstanceIds reject multi instance plugins with same id 1`] = ` "Plugin "plugin-docs" is used 2 times with ID "sameId". To use the same plugin multiple times on a Docusaurus site, you need to assign a unique ID to each plugin instance." `; exports[`...
2,283
0
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/plugins/__tests__
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/plugins/__tests__/__snapshots__/presets.test.ts.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`loadPresets array form 1`] = ` { "plugins": [ [ "@docusaurus/plugin-content-docs", undefined, ], [ "@docusaurus/plugin-content-blog", undefined, ], ], "themes": [], } `; exports[`loadPresets array form composite 1`] = ` ...
2,284
0
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/plugins/__tests__
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/plugins/__tests__/__snapshots__/routeConfig.test.ts.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`sortConfig sorts route config correctly 1`] = ` [ { "component": "", "path": "/community", }, { "component": "", "path": "/some-page", }, { "component": "", "path": "/docs", "routes": [ { "component": "", "p...
2,287
0
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/translations
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/translations/__tests__/translations.test.ts
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import {jest} from '@jest/globals'; import fs from 'fs-extra'; import path from 'path'; import tmp from 'tmp-promise'; import { ...
2,288
0
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/translations
petrpan-code/facebook/docusaurus/packages/docusaurus/src/server/translations/__tests__/translationsExtractor.test.ts
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import {jest} from '@jest/globals'; import path from 'path'; import fs from 'fs-extra'; import tmp from 'tmp-promise'; import {SRC...
2,293
0
petrpan-code/facebook/docusaurus/packages/docusaurus/src/webpack
petrpan-code/facebook/docusaurus/packages/docusaurus/src/webpack/__tests__/base.test.ts
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import {jest} from '@jest/globals'; import path from 'path'; import _ from 'lodash'; import * as utils from '@docusaurus/utils/lib...
2,294
0
petrpan-code/facebook/docusaurus/packages/docusaurus/src/webpack
petrpan-code/facebook/docusaurus/packages/docusaurus/src/webpack/__tests__/client.test.ts
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import webpack from 'webpack'; import createClientConfig from '../client'; import {loadSetup} from '../../server/__tests__/testUt...
2,295
0
petrpan-code/facebook/docusaurus/packages/docusaurus/src/webpack
petrpan-code/facebook/docusaurus/packages/docusaurus/src/webpack/__tests__/server.test.ts
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import {jest} from '@jest/globals'; import webpack from 'webpack'; import createServerConfig from '../server'; import {loadSetup}...
2,296
0
petrpan-code/facebook/docusaurus/packages/docusaurus/src/webpack
petrpan-code/facebook/docusaurus/packages/docusaurus/src/webpack/__tests__/utils.test.ts
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import path from 'path'; import webpack, {type Configuration, type RuleSetRule} from 'webpack'; import { getCustomizableJSLoade...
2,299
0
petrpan-code/facebook/docusaurus/packages/docusaurus/src/webpack/__tests__
petrpan-code/facebook/docusaurus/packages/docusaurus/src/webpack/__tests__/__snapshots__/base.test.ts.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`base webpack config creates webpack aliases 1`] = ` { "@docusaurus/BrowserOnly": "../../../../client/exports/BrowserOnly.tsx", "@docusaurus/ComponentCreator": "../../../../client/exports/ComponentCreator.tsx", "@docusaurus/ErrorBoundary": "../../../../client/ex...
2,301
0
petrpan-code/facebook/docusaurus/packages/docusaurus/src/webpack/aliases
petrpan-code/facebook/docusaurus/packages/docusaurus/src/webpack/aliases/__tests__/index.test.ts
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import fs from 'fs-extra'; import path from 'path'; import { loadThemeAliases, loadDocusaurusAliases, sortAliases, createA...
2,306
0
petrpan-code/facebook/docusaurus/packages/docusaurus/src/webpack/aliases/__tests__
petrpan-code/facebook/docusaurus/packages/docusaurus/src/webpack/aliases/__tests__/__snapshots__/index.test.ts.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`getDocusaurusAliases returns appropriate webpack aliases 1`] = ` { "@docusaurus/BrowserOnly": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/BrowserOnly.tsx", "@docusaurus/ComponentCreator": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/Component...
2,323
0
petrpan-code/facebook/docusaurus/packages/eslint-plugin/src/rules
petrpan-code/facebook/docusaurus/packages/eslint-plugin/src/rules/__tests__/no-html-links.test.ts
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import rule from '../no-html-links'; import {RuleTester} from './testUtils'; const errorsJSX = [{messageId: 'link'}] as const; c...
2,324
0
petrpan-code/facebook/docusaurus/packages/eslint-plugin/src/rules
petrpan-code/facebook/docusaurus/packages/eslint-plugin/src/rules/__tests__/no-untranslated-text.test.ts
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import rule from '../no-untranslated-text'; import {getCommonValidTests, RuleTester} from './testUtils'; const errorsJSX = [{mess...
2,325
0
petrpan-code/facebook/docusaurus/packages/eslint-plugin/src/rules
petrpan-code/facebook/docusaurus/packages/eslint-plugin/src/rules/__tests__/prefer-docusaurus-heading.test.ts
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import rule from '../prefer-docusaurus-heading'; import {RuleTester} from './testUtils'; const errorsJSX = [{messageId: 'headings...
2,326
0
petrpan-code/facebook/docusaurus/packages/eslint-plugin/src/rules
petrpan-code/facebook/docusaurus/packages/eslint-plugin/src/rules/__tests__/string-literal-i18n-messages.test.ts
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import rule from '../string-literal-i18n-messages'; import {getCommonValidTests, RuleTester} from './testUtils'; const errorsJSX ...
2,334
0
petrpan-code/facebook/docusaurus/packages/lqip-loader/src
petrpan-code/facebook/docusaurus/packages/lqip-loader/src/__tests__/lqip.test.ts
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import path from 'path'; import {base64} from '../lqip'; const imgPath = path.join(__dirname, '__fixtures__', 'endi.jpg'); const ...
2,340
0
petrpan-code/facebook/docusaurus/packages/stylelint-copyright/src
petrpan-code/facebook/docusaurus/packages/stylelint-copyright/src/__tests__/index.test.ts
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /* eslint-disable jest/no-conditional-expect */ import path from 'path'; import stylelint from 'stylelint'; import rule from '../i...
2,631
0
petrpan-code/facebook/docusaurus/website/src/data
petrpan-code/facebook/docusaurus/website/src/data/__tests__/user.test.ts
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import fs from 'fs-extra'; import path from 'path'; import _ from 'lodash'; import imageSize from 'image-size'; import {Joi} from ...
2,687
0
petrpan-code/facebook/docusaurus/website/src/utils
petrpan-code/facebook/docusaurus/website/src/utils/__tests__/jsUtils.test.ts
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import {toggleListItem} from '../jsUtils'; describe('toggleListItem', () => { it('removes item already in list', () => { ex...
3,022
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/constructors
petrpan-code/styled-components/styled-components/packages/styled-components/src/constructors/test/createGlobalStyle.ssr.test.tsx
/** * @jest-environment node */ import React from 'react'; import ReactDOMServer from 'react-dom/server'; import ServerStyleSheet from '../../models/ServerStyleSheet'; import { stripComments, stripWhitespace } from '../../test/utils'; import createGlobalStyle from '../createGlobalStyle'; describe(`createGlobalStyle`...
3,023
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/constructors
petrpan-code/styled-components/styled-components/packages/styled-components/src/constructors/test/createGlobalStyle.test.tsx
import React from 'react'; import ReactDOM from 'react-dom'; import { act, Simulate } from 'react-dom/test-utils'; import ReactTestRenderer from 'react-test-renderer'; import * as constants from '../../constants'; import { StyleSheetManager } from '../../models/StyleSheetManager'; import ThemeProvider from '../../model...
3,024
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/constructors
petrpan-code/styled-components/styled-components/packages/styled-components/src/constructors/test/keyframes.test.tsx
import React from 'react'; import TestRenderer from 'react-test-renderer'; import stylisRTLPlugin from 'stylis-plugin-rtl'; import Keyframes from '../../models/Keyframes'; import { StyleSheetManager } from '../../models/StyleSheetManager'; import { getRenderedCSS, resetStyled } from '../../test/utils'; import css from ...
3,025
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/constructors
petrpan-code/styled-components/styled-components/packages/styled-components/src/constructors/test/styled.test.tsx
import React, { ComponentProps } from 'react'; import TestRenderer from 'react-test-renderer'; import { getRenderedCSS, resetStyled } from '../../test/utils'; import domElements from '../../utils/domElements'; let styled: ReturnType<typeof resetStyled>; describe('styled', () => { beforeEach(() => { styled = res...
3,037
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/models
petrpan-code/styled-components/styled-components/packages/styled-components/src/models/test/Keyframes.test.ts
import Keyframes from '../Keyframes'; describe('Keyframes', () => { it('should throw an error when converted to string', () => { const keyframes = new Keyframes('foo', 'bar'); expect(() => keyframes.toString()).toThrowError( /It seems you are interpolating a keyframe declaration \(foo\) into an untagge...
3,038
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/models
petrpan-code/styled-components/styled-components/packages/styled-components/src/models/test/StyleSheetManager.test.tsx
import React from 'react'; import { render } from 'react-dom'; import { renderToString } from 'react-dom/server'; import Frame, { FrameContextConsumer } from 'react-frame-component'; import TestRenderer, { act } from 'react-test-renderer'; import stylisRTLPlugin from 'stylis-plugin-rtl'; import StyleSheet from '../../s...
3,039
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/models
petrpan-code/styled-components/styled-components/packages/styled-components/src/models/test/ThemeProvider.test.tsx
import React from 'react'; import TestRenderer, { ReactTestInstance } from 'react-test-renderer'; import withTheme from '../../hoc/withTheme'; import { resetStyled } from '../../test/utils'; import ThemeProvider, { useTheme } from '../ThemeProvider'; let styled: ReturnType<typeof resetStyled>; describe('ThemeProvider...
3,040
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/models/test
petrpan-code/styled-components/styled-components/packages/styled-components/src/models/test/__snapshots__/StyleSheetManager.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`StyleSheetManager should apply styles to appropriate targets for nested StyleSheetManagers 1`] = ` <style data-styled="active" data-styled-version="JEST_MOCK_VERSION" > .d{color:red;} </style> <style data-styled="active" data-styled-version="JEST_MOCK...
3,041
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/models/test
petrpan-code/styled-components/styled-components/packages/styled-components/src/models/test/__snapshots__/ThemeProvider.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`ThemeProvider should render its child 1`] = ` <p> Child! </p> `;
3,043
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/native
petrpan-code/styled-components/styled-components/packages/styled-components/src/native/test/native.test.tsx
import React, { PropsWithChildren } from 'react'; import { Image, Text, View, ViewProps } from 'react-native'; import TestRenderer from 'react-test-renderer'; import styled, { ThemeProvider, css, toStyleSheet } from '../'; // NOTE: These tests are like the ones for Web but a "light-version" of them // This is mostly d...
3,052
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/sheet
petrpan-code/styled-components/styled-components/packages/styled-components/src/sheet/test/GroupIDAllocator.test.ts
import * as GroupIDAllocator from '../GroupIDAllocator'; beforeEach(GroupIDAllocator.resetGroupIds); afterEach(GroupIDAllocator.resetGroupIds); it('creates continuous group IDs', () => { const a = GroupIDAllocator.getGroupForId('a'); const b = GroupIDAllocator.getGroupForId('b'); expect(a).toBe(1); expect(b)...
3,053
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/sheet
petrpan-code/styled-components/styled-components/packages/styled-components/src/sheet/test/GroupedTag.test.ts
import { makeGroupedTag } from '../GroupedTag'; import { VirtualTag } from '../Tag'; let tag: InstanceType<typeof VirtualTag>; let groupedTag: ReturnType<typeof makeGroupedTag>; beforeEach(() => { tag = new VirtualTag(); groupedTag = makeGroupedTag(tag); }); it('inserts and retrieves rules by groups correctly', ...
3,054
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/sheet
petrpan-code/styled-components/styled-components/packages/styled-components/src/sheet/test/Rehydration.test.tsx
import React from 'react'; import TestRenderer from 'react-test-renderer'; import { ServerStyleSheet, StyleSheetManager } from '../../base'; import { SC_ATTR, SC_ATTR_ACTIVE, SC_ATTR_VERSION, SC_VERSION } from '../../constants'; import { resetStyled } from '../../test/utils'; import * as GroupIDAllocator from '../Grou...
3,055
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/sheet
petrpan-code/styled-components/styled-components/packages/styled-components/src/sheet/test/Sheet.test.ts
import StyleSheet from '../Sheet'; let sheet: InstanceType<typeof StyleSheet>; let tag; beforeEach(() => { sheet = new StyleSheet({ isServer: true }); tag = sheet.getTag().tag; }); it('inserts rules correctly', () => { expect(tag.length).toBe(0); sheet.insertRules('id', 'name', ['.test {}']); expect(sheet....
3,056
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/sheet
petrpan-code/styled-components/styled-components/packages/styled-components/src/sheet/test/Tag.test.ts
import { C } from 'ts-toolbelt'; import { CSSOMTag, TextTag, VirtualTag } from '../Tag'; import { Tag } from '../types'; const describeTag = (TagClass: C.Class<[], Tag>) => { it('inserts and retrieves rules at indices', () => { const tag = new TagClass(); expect(tag.insertRule(0, '.b {}')).toBe(true); ex...
3,057
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/sheet
petrpan-code/styled-components/styled-components/packages/styled-components/src/sheet/test/dom.test.ts
import { SC_ATTR, SC_ATTR_ACTIVE, SC_ATTR_VERSION } from '../../constants'; import { makeStyleTag } from '../dom'; describe('makeStyleTag', () => { it('creates a style element with the SC attributes', () => { const element = makeStyleTag(); expect(element.tagName).toBe('STYLE'); expect(element.getAttrib...
3,058
0
petrpan-code/styled-components/styled-components/packages/styled-components/src
petrpan-code/styled-components/styled-components/packages/styled-components/src/test/attrs.test.tsx
import * as CSS from 'csstype'; import React from 'react'; import TestRenderer from 'react-test-renderer'; import ThemeProvider from '../models/ThemeProvider'; import { AnyComponent, DataAttributes } from '../types'; import { getRenderedCSS, resetStyled } from './utils'; // Disable isStaticRules optimisation since we'...
3,059
0
petrpan-code/styled-components/styled-components/packages/styled-components/src
petrpan-code/styled-components/styled-components/packages/styled-components/src/test/basic.test.tsx
import React, { Component, CSSProperties, StrictMode } from 'react'; import { findDOMNode } from 'react-dom'; import { findRenderedComponentWithType, renderIntoDocument } from 'react-dom/test-utils'; import TestRenderer from 'react-test-renderer'; import { find } from '../../test-utils'; import { AnyComponent } from '....
3,060
0
petrpan-code/styled-components/styled-components/packages/styled-components/src
petrpan-code/styled-components/styled-components/packages/styled-components/src/test/constants.test.tsx
import { SC_ATTR as DEFAULT_SC_ATTR } from '../constants'; import { expectCSSMatches } from './utils'; declare global { namespace NodeJS { export interface ProcessEnv { REACT_APP_SC_DISABLE_SPEEDY?: boolean | string; SC_DISABLE_SPEEDY?: boolean | string; } } interface Window { REACT_APP_...
3,061
0
petrpan-code/styled-components/styled-components/packages/styled-components/src
petrpan-code/styled-components/styled-components/packages/styled-components/src/test/css.test.tsx
import React from 'react'; import TestRenderer from 'react-test-renderer'; import { getRenderedCSS, resetStyled } from './utils'; // Disable isStaticRules optimisation since we're not // testing for ComponentStyle specifics here jest.mock('../utils/isStaticRules', () => () => false); let styled: ReturnType<typeof res...
3,062
0
petrpan-code/styled-components/styled-components/packages/styled-components/src
petrpan-code/styled-components/styled-components/packages/styled-components/src/test/expanded-api.test.tsx
import React from 'react'; import TestRenderer from 'react-test-renderer'; import { getRenderedCSS, resetStyled } from './utils'; // Disable isStaticRules optimisation since we're not // testing for ComponentStyle specifics here jest.mock('../utils/isStaticRules', () => () => false); let styled: ReturnType<typeof res...
3,064
0
petrpan-code/styled-components/styled-components/packages/styled-components/src
petrpan-code/styled-components/styled-components/packages/styled-components/src/test/overriding.test.tsx
import React from 'react'; import TestRenderer from 'react-test-renderer'; import { AnyComponent } from '../types'; import { getRenderedCSS, resetStyled } from './utils'; // Disable isStaticRules optimisation since we're not // testing for ComponentStyle specifics here jest.mock('../utils/isStaticRules', () => () => f...
3,065
0
petrpan-code/styled-components/styled-components/packages/styled-components/src
petrpan-code/styled-components/styled-components/packages/styled-components/src/test/props.test.tsx
import React, { Fragment } from 'react'; import TestRenderer from 'react-test-renderer'; import { getRenderedCSS, resetStyled } from './utils'; let styled: ReturnType<typeof resetStyled>; describe('props', () => { beforeEach(() => { styled = resetStyled(); }); it('should execute interpolations and fall bac...
3,066
0
petrpan-code/styled-components/styled-components/packages/styled-components/src
petrpan-code/styled-components/styled-components/packages/styled-components/src/test/rehydration.test.tsx
import React from 'react'; import TestRenderer from 'react-test-renderer'; import { SC_ATTR, SC_ATTR_VERSION } from '../constants'; import { getRenderedCSS, rehydrateTestStyles, resetStyled, seedNextClassnames } from './utils'; declare const __VERSION__: string; /* NOTE: Sometimes we add an empty function interpol...
3,067
0
petrpan-code/styled-components/styled-components/packages/styled-components/src
petrpan-code/styled-components/styled-components/packages/styled-components/src/test/ssr.test.tsx
/** * @jest-environment node */ import { resetStyled } from './utils'; import React from 'react'; import { renderToNodeStream, renderToString } from 'react-dom/server'; import stylisRTLPlugin from 'stylis-plugin-rtl'; import createGlobalStyle from '../constructors/createGlobalStyle'; import ServerStyleSheet from '....
3,068
0
petrpan-code/styled-components/styled-components/packages/styled-components/src
petrpan-code/styled-components/styled-components/packages/styled-components/src/test/staticCaching.test.ts
import { resetStyled } from './utils'; let styled: ReturnType<typeof resetStyled>; describe('static style caching', () => { beforeEach(() => { styled = resetStyled(); }); describe('non-production modes', () => { it('should mark styles without any functions as not static', () => { const TOP_AS_NUM...
3,069
0
petrpan-code/styled-components/styled-components/packages/styled-components/src
petrpan-code/styled-components/styled-components/packages/styled-components/src/test/styles.test.tsx
import React from 'react'; import TestRenderer from 'react-test-renderer'; import { ThemeProvider } from '../base'; import css from '../constructors/css'; import { mainSheet } from '../models/StyleSheetManager'; import * as nonce from '../utils/nonce'; import { getRenderedCSS, resetStyled } from './utils'; jest.mock('...
3,070
0
petrpan-code/styled-components/styled-components/packages/styled-components/src
petrpan-code/styled-components/styled-components/packages/styled-components/src/test/theme.test.tsx
import React, { Component } from 'react'; import { renderIntoDocument } from 'react-dom/test-utils'; import TestRenderer from 'react-test-renderer'; import withTheme from '../hoc/withTheme'; import ThemeProvider, { DefaultTheme } from '../models/ThemeProvider'; import { getRenderedCSS, resetStyled } from './utils'; le...
3,074
0
petrpan-code/styled-components/styled-components/packages/styled-components/src
petrpan-code/styled-components/styled-components/packages/styled-components/src/test/warnOnDynamicCreation.test.tsx
import React from 'react'; import TestRenderer from 'react-test-renderer'; import { resetStyled } from './utils'; describe('warns on dynamic creation', () => { let warn: ReturnType<typeof jest.spyOn>; let styled: ReturnType<typeof resetStyled>; beforeEach(() => { warn = jest.spyOn(console, 'warn').mockImpl...
3,075
0
petrpan-code/styled-components/styled-components/packages/styled-components/src
petrpan-code/styled-components/styled-components/packages/styled-components/src/test/warnTooManyClasses.test.tsx
import React from 'react'; import TestRenderer from 'react-test-renderer'; import { LIMIT } from '../utils/createWarnTooManyClasses'; import { resetStyled } from './utils'; let styled: ReturnType<typeof resetStyled>; describe('warn too many classes', () => { /** * Make sure the setup is the same for every test ...
3,076
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/test
petrpan-code/styled-components/styled-components/packages/styled-components/src/test/__snapshots__/attrs.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`attrs does not pass transient props to HTML element 1`] = ` <div className="sc-a sc-b c" /> `; exports[`attrs merge attrs 1`] = ` <button className="sc-a" tabIndex={0} type="submit" /> `; exports[`attrs merge attrs when inheriting SC 1`] = ` <button class...
3,077
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/test
petrpan-code/styled-components/styled-components/packages/styled-components/src/test/__snapshots__/expanded-api.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`expanded api "as" prop changes the rendered element type 1`] = ` <span className="sc-a b" /> `; exports[`expanded api "as" prop changes the rendered element type when used with attrs 1`] = ` <header className="sc-a b" /> `; exports[`expanded api "as" prop works...
3,078
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/test
petrpan-code/styled-components/styled-components/packages/styled-components/src/test/__snapshots__/props.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`props shouldForwardProp should inherit shouldForwardProp for wrapped styled components 2`] = ` [ <div className="sc-a c" id="test-1" />, <div className="sc-a sc-b d" id="test-2" />, ] `;
3,079
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/test
petrpan-code/styled-components/styled-components/packages/styled-components/src/test/__snapshots__/ssr.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`ssr should add a nonce to the stylesheet if webpack nonce is detected in the global scope 1`] = ` <h1 class="sc-b c"> Hello SSR! </h1> `; exports[`ssr should add a nonce to the stylesheet if webpack nonce is detected in the global scope 2`] = ` <style nonce="foo" ...
3,080
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/test
petrpan-code/styled-components/styled-components/packages/styled-components/src/test/__snapshots__/theme.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`theming should not allow the theme to be a non-object 1`] = `"ThemeProvider: Please make your "theme" prop an object."`; exports[`theming should not allow the theme to be an array 1`] = `"ThemeProvider: Please make your "theme" prop an object."`; exports[`theming s...
3,111
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils/test/addUnitIfNeeded.test.ts
import addUnitIfNeeded from '../addUnitIfNeeded'; it('adds a px prefix if needed for properties that require a unit', () => { const pairs: Array<[string, number]> = [ ['marginLeft', 1], ['top', -1], ['flexBasis', 100], ['gridTemplateColumns', 200], ['fontSize', 10], ]; pairs.forEach(([key, va...
3,112
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils/test/determineTheme.test.ts
import determineTheme from '../determineTheme'; const theme = { color: 'red' }; const fallback = { color: 'blue' }; const props = { theme }; const defaultProps = { theme: fallback }; describe('determineTheme', () => { it('should take precedence over ThemeProvider', () => { expect(determineTheme(props, fallback,...
3,113
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils/test/error.test.ts
import styledError from '../error'; describe('development', () => { it('returns a rich error', () => { expect(() => { throw styledError(2); }).toThrowErrorMatchingInlineSnapshot(` "Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instanc...
3,114
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils/test/escape.test.ts
import escape from '../escape'; describe('escape', () => { it('replaces characters that could be part of CSS selectors', () => { expect(escape('foo(bar):#*$><+~=|^baz')).toEqual('foo-bar-baz'); }); it('replaces double hyphens with a single hyphen', () => { expect(escape('foo--bar')).toEqual('foo-bar'); ...
3,115
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils/test/flatten.test.tsx
import React from 'react'; import TestRenderer from 'react-test-renderer'; import styled from '../../constructors/styled'; import flatten from '../flatten'; describe('flatten', () => { it('doesnt merge strings', () => { expect(flatten(['foo', 'bar', 'baz'])).toEqual(['foo', 'bar', 'baz']); }); it('drops nul...
3,116
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils/test/generateAlphabeticName.test.ts
import generateAlphabeticName from '../generateAlphabeticName'; describe('generateAlphabeticName', () => { it('should create alphabetic names for number input data', () => { expect(generateAlphabeticName(1000000000)).toEqual('cGNYzm'); expect(generateAlphabeticName(2000000000)).toEqual('fnBWYy'); }); it...
3,117
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils/test/generateDisplayName.test.ts
import React from 'react'; import generateDisplayName from '../generateDisplayName'; it('handles a string type', () => { expect(generateDisplayName('div')).toBe('styled.div'); }); it('handles a React class type', () => { class Foo extends React.Component {} expect(generateDisplayName(Foo)).toBe('Styled(Foo)');...
3,118
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils/test/getComponentName.test.tsx
import React from 'react'; import getComponentName from '../getComponentName'; describe('getComponentName', () => { let Test: React.FC; beforeEach(() => { Test = () => <div />; }); it('defaults to reusing the component displayName', () => { Test.displayName = 'Foo'; expect(getComponentName(Test))...
3,119
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils/test/hyphenateStyleName.test.ts
import hyphenateStyleName from '../hyphenateStyleName'; test('hyphenateStyleName', () => { expect(hyphenateStyleName('backgroundColor')).toEqual('background-color'); expect(hyphenateStyleName('MozTransition')).toEqual('-moz-transition'); expect(hyphenateStyleName('msTransition')).toEqual('-ms-transition'); // ...
3,120
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils/test/interleave.test.ts
import interleave from '../interleave'; describe('interleave', () => { it('blindly interleave', () => { expect(interleave([], [])).toEqual([undefined]); expect(interleave(['foo'], [])).toEqual(['foo']); expect(interleave(['foo'], [1])).toEqual(['foo', 1, undefined]); expect(interleave(['foo', 'bar'],...
3,121
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils/test/isPlainObject.test.ts
import React from 'react'; import vm from 'vm'; import isPlainObject from '../isPlainObject'; it('returns true for an object literal', () => { expect(isPlainObject({})).toEqual(true); }); it('returns false for an instance of a class with its own toString method', () => { class SomeClass { toString() { r...
3,122
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils/test/isStatelessFunction.test.tsx
import React, { Component } from 'react'; import styled from '../../'; import isStatelessFunction from '../isStatelessFunction'; class MockComponent extends Component { render() { return <div {...this.props} />; } } describe('isStatelessFunction(something)', () => { it('returns true if stateless', () => { ...
3,123
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils/test/isStyledComponent.test.ts
import React from 'react'; import styled from '../../'; import isStyledComponent from '../isStyledComponent'; describe('isStyledComponent(something)', () => { it('returns true if using styled', () => { expect(isStyledComponent(styled.div``)).toBe(true); expect(isStyledComponent(styled(styled.div``)``)).toBe(...
3,124
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils/test/joinStrings.test.ts
import { joinStringArray, joinStrings } from '../joinStrings'; describe('joinStrings(string?, string?)', () => { it('joins the two strings with a space between', () => { expect(joinStrings('a', 'b')).toBe('a b'); expect(joinStrings('a ', 'b')).toBe('a b'); expect(joinStrings('a ', ' b')).toBe('a b'); ...
3,125
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils/test/mixinDeep.test.ts
/* ported from https://github.com/jonschlinkert/mixin-deep; thanks Jon! */ import mixinDeep from '../mixinDeep'; class MyObj { foo: any; bar: any; baz?: 5; constructor(foo: any, bar: any, baz: any = undefined) { this.foo = foo; this.bar = bar; if (baz) { this.baz = 5; } } } it('should ...
3,126
0
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils
petrpan-code/styled-components/styled-components/packages/styled-components/src/utils/test/stylis.test.ts
import createStylisInstance, { ICreateStylisInstance } from '../stylis'; function stylisTest(css: string, options: ICreateStylisInstance = {}): string[] { const stylis = createStylisInstance(options); const componentId = 'a'; return stylis(css, `.${componentId}`, undefined, componentId); } describe('stylis', ()...
3,815
0
petrpan-code/TanStack/query/packages/eslint-plugin-query/src
petrpan-code/TanStack/query/packages/eslint-plugin-query/src/__tests__/configs.test.ts
import { describe, expect, it } from 'vitest' import { configs } from '../configs' describe('configs', () => { it('should match snapshot', () => { expect(configs).toMatchInlineSnapshot(` { "recommended": { "plugins": [ "@tanstack/eslint-plugin-query", ], "r...
3,816
0
petrpan-code/TanStack/query/packages/eslint-plugin-query/src
petrpan-code/TanStack/query/packages/eslint-plugin-query/src/__tests__/exhaustive-deps.test.ts
import { ESLintUtils } from '@typescript-eslint/utils' import { normalizeIndent } from '../utils/test-utils' import { rule } from '../rules/exhaustive-deps.rule' const ruleTester = new ESLintUtils.RuleTester({ parser: '@typescript-eslint/parser', settings: {}, }) ruleTester.run('exhaustive-deps', rule, { valid:...
3,820
0
petrpan-code/TanStack/query/packages/eslint-plugin-query/src/rules
petrpan-code/TanStack/query/packages/eslint-plugin-query/src/rules/no-rest-desctructuring/no-rest-destructuring.test.ts
import { ESLintUtils } from '@typescript-eslint/utils' import { normalizeIndent } from '../../utils/test-utils' import { rule } from './no-rest-destructuring.rule' const ruleTester = new ESLintUtils.RuleTester({ parser: '@typescript-eslint/parser', settings: {}, }) ruleTester.run('no-rest-desctructuring', rule, {...
3,823
0
petrpan-code/TanStack/query/packages/eslint-plugin-query/src/rules
petrpan-code/TanStack/query/packages/eslint-plugin-query/src/rules/stable-query-client/stable-query-client.test.ts
import { ESLintUtils } from '@typescript-eslint/utils' import { normalizeIndent } from '../../utils/test-utils' import { rule } from './stable-query-client.rule' const ruleTester = new ESLintUtils.RuleTester({ parser: '@typescript-eslint/parser', settings: {}, }) ruleTester.run('stable-query-client', rule, { va...
3,837
0
petrpan-code/TanStack/query/packages/query-async-storage-persister/src
petrpan-code/TanStack/query/packages/query-async-storage-persister/src/__tests__/asyncThrottle.test.ts
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest' import { asyncThrottle } from '../asyncThrottle' import { sleep as delay } from './utils' describe('asyncThrottle', () => { beforeEach(() => { vi.useFakeTimers() }) afterEach(() => { vi.useRealTimers() }) test('basic', async...
3,869
0
petrpan-code/TanStack/query/packages/query-core/src
petrpan-code/TanStack/query/packages/query-core/src/tests/focusManager.test.tsx
import { beforeEach, describe, expect, it, test, vi } from 'vitest' import { sleep } from '../utils' import { FocusManager } from '../focusManager' import { setIsServer } from './utils' describe('focusManager', () => { let focusManager: FocusManager beforeEach(() => { vi.resetModules() focusManager = new F...
3,870
0
petrpan-code/TanStack/query/packages/query-core/src
petrpan-code/TanStack/query/packages/query-core/src/tests/hydration.test.tsx
import { describe, expect, test, vi } from 'vitest' import { QueryCache } from '../queryCache' import { dehydrate, hydrate } from '../hydration' import { MutationCache } from '../mutationCache' import { createQueryClient, executeMutation, mockOnlineManagerIsOnline, sleep, } from './utils' async function fetchD...
3,871
0
petrpan-code/TanStack/query/packages/query-core/src
petrpan-code/TanStack/query/packages/query-core/src/tests/infiniteQueryBehavior.test.tsx
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest' import { waitFor } from '@testing-library/react' import { CancelledError, InfiniteQueryObserver } from '..' import { createQueryClient, queryKey, sleep } from './utils' import type { InfiniteQueryObserverResult, QueryCache, QueryClient } from '....
3,872
0
petrpan-code/TanStack/query/packages/query-core/src
petrpan-code/TanStack/query/packages/query-core/src/tests/infiniteQueryObserver.test.tsx
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest' import { InfiniteQueryObserver } from '..' import { createQueryClient, queryKey, sleep } from './utils' import type { QueryClient } from '..' describe('InfiniteQueryObserver', () => { let queryClient: QueryClient beforeEach(() => { que...
3,873
0
petrpan-code/TanStack/query/packages/query-core/src
petrpan-code/TanStack/query/packages/query-core/src/tests/mutationCache.test.tsx
import { describe, expect, test, vi } from 'vitest' import { waitFor } from '@testing-library/react' import { MutationCache, MutationObserver } from '..' import { createQueryClient, executeMutation, queryKey, sleep } from './utils' describe('mutationCache', () => { describe('MutationCacheConfig error callbacks', () ...
3,874
0
petrpan-code/TanStack/query/packages/query-core/src
petrpan-code/TanStack/query/packages/query-core/src/tests/mutationObserver.test.tsx
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest' import { waitFor } from '@testing-library/react' import { MutationObserver } from '..' import { createQueryClient, sleep } from './utils' import type { QueryClient } from '..' describe('mutationObserver', () => { let queryClient: QueryClient ...
3,875
0
petrpan-code/TanStack/query/packages/query-core/src
petrpan-code/TanStack/query/packages/query-core/src/tests/mutations.test.tsx
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest' import { waitFor } from '@testing-library/react' import { MutationObserver } from '../mutationObserver' import { createQueryClient, executeMutation, queryKey, sleep } from './utils' import type { QueryClient } from '..' import type { MutationSta...
3,876
0
petrpan-code/TanStack/query/packages/query-core/src
petrpan-code/TanStack/query/packages/query-core/src/tests/notifyManager.test.tsx
import { describe, expect, it, vi } from 'vitest' import { createNotifyManager } from '../notifyManager' import { sleep } from './utils' describe('notifyManager', () => { it('should use default notifyFn', async () => { const notifyManagerTest = createNotifyManager() const callbackSpy = vi.fn() notifyMana...
3,877
0
petrpan-code/TanStack/query/packages/query-core/src
petrpan-code/TanStack/query/packages/query-core/src/tests/onlineManager.test.tsx
import { beforeEach, describe, expect, test, vi } from 'vitest' import { OnlineManager } from '../onlineManager' import { setIsServer, sleep } from './utils' describe('onlineManager', () => { let onlineManager: OnlineManager beforeEach(() => { onlineManager = new OnlineManager() }) test('isOnline should r...
3,878
0
petrpan-code/TanStack/query/packages/query-core/src
petrpan-code/TanStack/query/packages/query-core/src/tests/queriesObserver.test.tsx
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest' import { waitFor } from '@testing-library/react' import { QueriesObserver } from '..' import { createQueryClient, queryKey, sleep } from './utils' import type { QueryClient, QueryObserverResult } from '..' describe('queriesObserver', () => { ...
3,879
0
petrpan-code/TanStack/query/packages/query-core/src
petrpan-code/TanStack/query/packages/query-core/src/tests/query.test.tsx
import { afterEach, beforeEach, describe, expect, it, test, vi } from 'vitest' import { waitFor } from '@testing-library/react' import { QueryObserver, isCancelledError, onlineManager } from '..' import { createQueryClient, mockVisibilityState, queryKey, setIsServer, sleep, } from './utils' import type { Qu...
3,880
0
petrpan-code/TanStack/query/packages/query-core/src
petrpan-code/TanStack/query/packages/query-core/src/tests/queryCache.test.tsx
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest' import { waitFor } from '@testing-library/react' import { QueryCache, QueryClient, QueryObserver } from '..' import { createQueryClient, queryKey, sleep } from './utils' describe('queryCache', () => { let queryClient: QueryClient let queryC...