Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ node_modules
.history
build
coverage
jest.config.js
jest.transform.js
jest/vendor
examples/

packages/lqip-loader/lib/
Expand Down
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@ module.exports = {
// they run
files: [
'*.test.{js,ts,tsx}',
'**/__tests__/**',
'admin/**',
'test/**',
'website/**',
Expand Down
4 changes: 2 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
**/__mocks__/** linguist-generated
examples/** linguist-generated
.husky/** linguist-vendored
jest/** linguist-vendored
test/** linguist-vendored
admin/** linguist-documentation
website/** linguist-documentation
packages/create-docusaurus/templates/** linguist-vendored
.eslintrc.* linguist-vendored
jest.config.* linguist-vendored
vitest.config.* linguist-vendored
.stylelintrc.* linguist-vendored
8 changes: 4 additions & 4 deletions .github/workflows/tests-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
paths:
- package.json
- yarn.lock
- jest.config.mjs
- jest/**
- vitest.config.ts
- test/**
- packages/**
- tsconfig.*.json
pull_request:
Expand All @@ -19,8 +19,8 @@ on:
paths:
- package.json
- yarn.lock
- jest.config.mjs
- jest/**
- vitest.config.ts
- test/**
- packages/**
- tsconfig.*.json
- admin/verdaccio.yaml
Expand Down
1 change: 1 addition & 0 deletions __tests__/validate-package-json.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import fs from 'fs-extra';
import {Globby} from '@docusaurus/utils';

Expand Down
1 change: 1 addition & 0 deletions __tests__/validate-tsconfig.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, it} from 'vitest';
import fs from 'fs-extra';
import {Globby} from '@docusaurus/utils';
import {Joi} from '@docusaurus/utils-validation';
Expand Down
1 change: 1 addition & 0 deletions packages/create-docusaurus/src/__tests__/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import {siteNameToPackageName} from '../utils';

describe('siteNameToPackageName', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it, vi} from 'vitest';
import fs from 'fs-extra';
import tmp from 'tmp-promise';
import {getBabelOptions} from '../utils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import {fromPartial, type PartialDeep} from '@total-typescript/shoehorn';
import {createJsLoaderFactory} from '../jsLoader';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import path from 'path';
import vfile from 'to-vfile';
import postcss from 'postcss';
Expand Down
1 change: 1 addition & 0 deletions packages/docusaurus-logger/src/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {beforeAll, describe, expect, it, vi} from 'vitest';
import logger from '../index';

// Force chalk to ANSI level 3 in tests, so output is colored even in CI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import {getFormat} from '../format';

describe('getFormat', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it, test} from 'vitest';
import escapeStringRegexp from 'escape-string-regexp';
import {
validateMDXFrontMatter,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ async function testProcess({
}
*/

import {describe, it} from 'vitest';

describe('md processor', () => {
it('parses simple commonmark', async () => {
// TODO no tests for now, wait until ESM support
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import path from 'path';
import remark2rehype from 'remark-rehype';
import stringify from 'rehype-stringify';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import {escapeMarkdownHeadingIds} from '@docusaurus/utils';
import plugin from '../index';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import details from '..';

async function process(content: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import head from '..';

async function process(content: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

/* Based on remark-slug (https://github.com/remarkjs/remark-slug) and gatsby-remark-autolink-headers (https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-remark-autolink-headers) */

import {describe, expect, it} from 'vitest';
import u from 'unist-builder';
import {visit} from 'unist-util-visit';
import {escapeMarkdownHeadingIds} from '@docusaurus/utils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import remark2rehype from 'remark-rehype';
import stringify from 'rehype-stringify';
import mermaid from '..';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {beforeEach, describe, expect, it, vi} from 'vitest';
import * as path from 'path';
import plugin from '..';
import type {PluginOptions} from '../index';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import path from 'path';
import vfile from 'to-vfile';
import plugin from '../index';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import {toHeadingHTMLValue} from '../utils';
import type {Heading} from 'mdast';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {beforeEach, describe, expect, it, vi} from 'vitest';
import * as path from 'path';
import vfile from 'to-vfile';
import plugin, {type PluginOptions} from '../index';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {beforeEach, describe, expect, it, vi} from 'vitest';
import * as path from 'path';
import vfile from 'to-vfile';
import plugin, {type PluginOptions} from '..';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {beforeEach, describe, expect, it, vi} from 'vitest';
import path from 'path';
import remark2rehype from 'remark-rehype';
import stringify from 'rehype-stringify';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import {removeTrailingSlash} from '@docusaurus/utils-common';
import {normalizePluginOptions} from '@docusaurus/utils-validation';
import collectRedirects from '../collectRedirects';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import createRedirectPageContent from '../createRedirectPageContent';

describe('createRedirectPageContent', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import {
createFromExtensionsRedirects,
createToExtensionsRedirects,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import {normalizePluginOptions} from '@docusaurus/utils-validation';
import {validateOptions, DEFAULT_OPTIONS} from '../options';
import type {Options} from '../options';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import {validateRedirect} from '../redirectValidation';

describe('validateRedirect', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import fs from 'fs-extra';
import path from 'path';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import {fromPartial, type PartialDeep} from '@total-typescript/shoehorn';
import {getBlogPostAuthors, groupBlogPostsByAuthorKey} from '../authors';
import type {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import path from 'path';
import {
type AuthorsMapInput,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import {reportDuplicateAuthors, reportInlineAuthors} from '../authorsProblems';
import type {Author} from '@docusaurus/plugin-content-blog';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import {normalizeSocials} from '../authorsSocials';
import type {AuthorSocials} from '@docusaurus/plugin-content-blog';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it, vi} from 'vitest';
import {fromPartial} from '@total-typescript/shoehorn';
import {
truncate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it, vi} from 'vitest';
import path from 'path';
import fs from 'fs-extra';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import {escapeRegexp} from '@docusaurus/utils';
import {validateBlogPostFrontMatter} from '../frontMatter';
import type {BlogPostFrontMatter} from '@docusaurus/plugin-content-blog';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it, vi} from 'vitest';
import * as path from 'path';
import {normalizePluginOptions} from '@docusaurus/utils-validation';
import {posixPath, getLocaleConfig, TEST_VCS} from '@docusaurus/utils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import {normalizePluginOptions} from '@docusaurus/utils-validation';
import {validateOptions, DEFAULT_OPTIONS, XSLTBuiltInPaths} from '../options';
import type {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import {fromPartial} from '@total-typescript/shoehorn';
import {toBlogSidebarProp, toTagsProp} from '../props';
import type {BlogPost} from '@docusaurus/plugin-content-blog';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import {calculateReadingTime} from '../readingTime';

describe('calculateReadingTime', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it, vi} from 'vitest';
import * as _ from 'lodash';
import {fromPartial} from '@total-typescript/shoehorn';
import {buildAllRoutes} from '../routes';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import {updateTranslationFileMessages} from '@docusaurus/utils';
import {fromPartial} from '@total-typescript/shoehorn';
import {getTranslationFiles, translateContent} from '../translations';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import {groupBlogSidebarItemsByYear} from './sidebarUtils';
import type {BlogSidebarItem} from '@docusaurus/plugin-content-blog';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {describe, expect, it} from 'vitest';
import path from 'path';
import vfile from 'to-vfile';

Expand Down
Binary file modified packages/docusaurus-plugin-content-docs/src/__tests__/cli.test.ts
Binary file not shown.
Loading
Loading