mirror of
https://github.com/withastro/astro.git
synced 2024-12-30 22:03:56 -05:00
chore: use biome to sort imports - only test files (#10180)
* chore: use biome to sort imports * do the sorting * Update package.json Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com> --------- Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
This commit is contained in:
parent
8e51bf9ea9
commit
062623438b
296 changed files with 589 additions and 481 deletions
16
biome.json
Normal file
16
biome.json
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"$schema": "https://biomejs.dev/schemas/1.5.3/schema.json",
|
||||
"files": {
|
||||
"include": ["*.test.js"],
|
||||
"ignore": ["vendor"]
|
||||
},
|
||||
"organizeImports": {
|
||||
"enabled": true
|
||||
},
|
||||
"linter": {
|
||||
"enabled": false
|
||||
},
|
||||
"formatter": {
|
||||
"enabled": false
|
||||
}
|
||||
}
|
|
@ -13,10 +13,10 @@
|
|||
"build:ci": "turbo run build:ci --filter=astro --filter=create-astro --filter=\"@astrojs/*\" --filter=\"@benchmark/*\"",
|
||||
"build:examples": "turbo run build --filter=\"@example/*\"",
|
||||
"dev": "turbo run dev --concurrency=40 --parallel --filter=astro --filter=create-astro --filter=\"@astrojs/*\" --filter=\"@benchmark/*\"",
|
||||
"format": "pnpm run format:code",
|
||||
"format:ci": "pnpm run format:code",
|
||||
"format": "pnpm run format:code && pnpm run format:imports",
|
||||
"format:ci": "pnpm run format:code && pnpm run format:imports",
|
||||
"format:code": "prettier -w \"**/*\" --ignore-unknown --cache",
|
||||
"format:imports": "organize-imports-cli ./packages/*/tsconfig.json ./packages/*/*/tsconfig.json",
|
||||
"format:imports": "biome check --apply .",
|
||||
"test": "turbo run test --concurrency=1 --filter=astro --filter=create-astro --filter=\"@astrojs/*\"",
|
||||
"test:match": "cd packages/astro && pnpm run test:match",
|
||||
"test:unit": "cd packages/astro && pnpm run test:unit",
|
||||
|
@ -45,6 +45,7 @@
|
|||
},
|
||||
"packageManager": "pnpm@8.6.12",
|
||||
"dependencies": {
|
||||
"@biomejs/biome": "^1.5.3",
|
||||
"astro-benchmark": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, it } from 'node:test';
|
||||
|
||||
import { phpFeedItem, web1FeedItem } from './test-utils.js';
|
||||
import { pagesGlobToRssItems } from '../dist/index.js';
|
||||
import { phpFeedItem, web1FeedItem } from './test-utils.js';
|
||||
|
||||
describe('pagesGlobToRssItems', () => {
|
||||
it('should generate on valid result', async () => {
|
||||
|
|
|
@ -6,6 +6,7 @@ import rss, { getRssString } from '../dist/index.js';
|
|||
import { rssSchema } from '../dist/schema.js';
|
||||
import {
|
||||
description,
|
||||
parseXmlString,
|
||||
phpFeedItem,
|
||||
phpFeedItemWithContent,
|
||||
phpFeedItemWithCustomData,
|
||||
|
@ -14,7 +15,6 @@ import {
|
|||
web1FeedItem,
|
||||
web1FeedItemWithAllData,
|
||||
web1FeedItemWithContent,
|
||||
parseXmlString,
|
||||
} from './test-utils.js';
|
||||
|
||||
// note: I spent 30 minutes looking for a nice node-based snapshot tool
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { expect } from '@playwright/test';
|
||||
import { testFactory, getErrorOverlayContent } from './test-utils.js';
|
||||
import { getErrorOverlayContent, testFactory } from './test-utils.js';
|
||||
|
||||
const test = testFactory({
|
||||
root: './fixtures/error-cyclic/',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { expect } from '@playwright/test';
|
||||
import { testFactory, getErrorOverlayContent } from './test-utils.js';
|
||||
import { getErrorOverlayContent, testFactory } from './test-utils.js';
|
||||
|
||||
const test = testFactory({
|
||||
root: './fixtures/error-sass/',
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { test as base, expect } from '@playwright/test';
|
||||
import { expect, test as base } from '@playwright/test';
|
||||
import { loadFixture, waitForHydrate } from './test-utils.js';
|
||||
|
||||
const test = base.extend({
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { prepareTestFactory } from './shared-component-tests.js';
|
||||
import { expect } from '@playwright/test';
|
||||
import { prepareTestFactory } from './shared-component-tests.js';
|
||||
const { test, createTests } = prepareTestFactory({ root: './fixtures/vue-component/' });
|
||||
|
||||
const config = {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it, after } from 'node:test';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it, after } from 'node:test';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it, after } from 'node:test';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it, after } from 'node:test';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { isWindows, loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import testAdapter from './test-adapter.js';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
import srcsetParse from 'srcset-parse';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
// This package isn't real ESM, so have to coerce it
|
||||
const matchSrcset = srcsetParse.default;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { after, describe, before, it } from 'node:test';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { load as cheerioLoad } from 'cheerio';
|
||||
import assert from 'node:assert/strict';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import { load as cheerioLoad } from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Client only components', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Component bundling', () => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as cheerio from 'cheerio';
|
||||
import assert from 'node:assert/strict';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('<Code>', () => {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import * as cheerio from 'cheerio';
|
||||
import assert from 'node:assert/strict';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
import * as cheerio from 'cheerio';
|
||||
import testAdapter from './test-adapter.js';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Astro.cookies', () => {
|
||||
/** @type {import('./test-utils').Fixture} */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as cheerio from 'cheerio';
|
||||
import assert from 'node:assert/strict';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
// note: the hashes should be deterministic, but updating the file contents will change hashes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as cheerio from 'cheerio';
|
||||
import assert from 'node:assert/strict';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Directives', async () => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as cheerio from 'cheerio';
|
||||
import assert from 'node:assert/strict';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Doctype', () => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as cheerio from 'cheerio';
|
||||
import assert from 'node:assert/strict';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Dynamic components', () => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Environment Variables', () => {
|
||||
/** @type {import('./test-utils').Fixture} */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as cheerio from 'cheerio';
|
||||
import assert from 'node:assert/strict';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Expressions', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('External file references', () => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as cheerio from 'cheerio';
|
||||
import assert from 'node:assert/strict';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Dynamic component fallback', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as cheerio from 'cheerio';
|
||||
import assert from 'node:assert/strict';
|
||||
import { after, afterEach, before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('getStaticPaths - build calls', () => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as cheerio from 'cheerio';
|
||||
import assert from 'node:assert/strict';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Astro Global', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
const FIXTURE_ROOT = './fixtures/astro-markdown-frontmatter-injection/';
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
import addClasses from './fixtures/astro-markdown-plugins/add-classes.mjs';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
const defaultMarkdownConfig = {
|
||||
gfm: true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture, fixLineEndings } from './test-utils.js';
|
||||
import { fixLineEndings, loadFixture } from './test-utils.js';
|
||||
|
||||
const FIXTURE_ROOT = './fixtures/astro-markdown/';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { after, describe, before, it } from 'node:test';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
// Asset bundling
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as cheerio from 'cheerio';
|
||||
import assert from 'node:assert/strict';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Object style', async () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('build format', () => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as cheerio from 'cheerio';
|
||||
import assert from 'node:assert/strict';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import { loadFixture, isWindows } from './test-utils.js';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { isWindows, loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Pages', () => {
|
||||
let fixture;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as cheerio from 'cheerio';
|
||||
import assert from 'node:assert/strict';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Partial HTML', async () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Public', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { after, describe, before, it } from 'node:test';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
// Asset bundling
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as cheerio from 'cheerio';
|
||||
import assert from 'node:assert/strict';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Scripts (hoisted and not)', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as cheerio from 'cheerio';
|
||||
import assert from 'node:assert/strict';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Nested Slots', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { after, describe, before, it } from 'node:test';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
import { preact } from './fixtures/before-hydration/deps.mjs';
|
||||
import testAdapter from './test-adapter.js';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Astro Scripts before-hydration', () => {
|
||||
describe('SSG', () => {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
import { preact } from './fixtures/before-hydration/deps.mjs';
|
||||
import testAdapter from './test-adapter.js';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('build assets (static)', () => {
|
||||
describe('with default configuration', () => {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, it } from 'node:test';
|
||||
import { cli, parseCliDevStart, cliServerLogSetup, loadFixture } from './test-utils.js';
|
||||
import stripAnsi from 'strip-ansi';
|
||||
import { promises as fs, readFileSync } from 'node:fs';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { isIPv4 } from 'node:net';
|
||||
import { join } from 'node:path';
|
||||
import { Writable } from 'node:stream';
|
||||
import { describe, it } from 'node:test';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import stripAnsi from 'strip-ansi';
|
||||
import { cli, cliServerLogSetup, loadFixture, parseCliDevStart } from './test-utils.js';
|
||||
|
||||
describe('astro cli', () => {
|
||||
const cliServerLogSetupWithFixture = (flags, cmd) => {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it, after } from 'node:test';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
import testAdapter from './test-adapter.js';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import testAdapter from './test-adapter.js';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Astro.clientAddress', () => {
|
||||
describe('SSR', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it, after } from 'node:test';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import { load as cheerioLoad } from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import testAdapter from './test-adapter.js';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('AstroConfig - config.output', () => {
|
||||
describe(`output: 'server'`, () => {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
|
||||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as assert from 'node:assert/strict';
|
||||
import { after, describe, before, it } from 'node:test';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { fixLineEndings, loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import * as assert from 'node:assert/strict';
|
||||
import { after, describe, before, it } from 'node:test';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture, isWindows } from './test-utils.js';
|
||||
import testAdapter from './test-adapter.js';
|
||||
import { isWindows, loadFixture } from './test-utils.js';
|
||||
|
||||
if (!isWindows) {
|
||||
describe();
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import * as devalue from 'devalue';
|
||||
import * as cheerio from 'cheerio';
|
||||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import * as devalue from 'devalue';
|
||||
import testAdapter from './test-adapter.js';
|
||||
import { preventNodeBuiltinDependencyPlugin } from './test-plugins.js';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Content Collections', () => {
|
||||
describe('Query', () => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, after, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { Writable } from 'node:stream';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
|
||||
import { Logger } from '../dist/core/logger/core.js';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, after, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { Writable } from 'node:stream';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
|
||||
import { Logger } from '../dist/core/logger/core.js';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, after, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { basename } from 'node:path';
|
||||
import { Writable } from 'node:stream';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import parseSrcset from 'parse-srcset';
|
||||
import { removeDir } from '../dist/core/fs/index.js';
|
||||
import { Logger } from '../dist/core/logger/core.js';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
const cssAssetReferenceRegExp = /_astro\/[A-Za-z\d\-]+\.[\da-f]{8}\.css/g;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as assert from 'node:assert/strict';
|
||||
import { describe, before, it, after } from 'node:test';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import * as assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
import testAdapter from './test-adapter.js';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Setting inlineStylesheets to never in static output', () => {
|
||||
let fixture;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as assert from 'node:assert/strict';
|
||||
import { describe, before, it, after } from 'node:test';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import * as assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
import testAdapter from './test-adapter.js';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('CSS production ordering', () => {
|
||||
function getLinks(html) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
import assert from 'node:assert/strict';
|
||||
import { after, describe, before, it } from 'node:test';
|
||||
|
||||
describe('Custom 404.html', () => {
|
||||
let fixture;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { loadFixture } from './test-utils.js';
|
||||
import assert from 'node:assert/strict';
|
||||
import { after, describe, before, it } from 'node:test';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
for (const caseNumber of [1, 2, 3, 4]) {
|
||||
describe(`Custom 404 with implicit rerouting - Case #${caseNumber}`, () => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { loadFixture } from './test-utils.js';
|
||||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Custom 404 with injectRoute from dependency', () => {
|
||||
describe('build', () => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
import assert from 'node:assert/strict';
|
||||
import { after, describe, before, it } from 'node:test';
|
||||
|
||||
describe('Custom 404 with injectRoute', () => {
|
||||
let fixture;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
import assert from 'node:assert/strict';
|
||||
import { after, describe, before, it } from 'node:test';
|
||||
|
||||
describe('Custom 404 Markdown', () => {
|
||||
let fixture;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
import assert from 'node:assert/strict';
|
||||
import { after, describe, before, it } from 'node:test';
|
||||
|
||||
describe('Custom 404 with Static', () => {
|
||||
let fixture;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('custom the assets name function', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
const authorIds = ['Ben Holmes', 'Fred K Schott', 'Nate Moore'];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { after, describe, before, it } from 'node:test';
|
||||
import { loadFixture, isMacOS } from './test-utils.js';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import { isMacOS, loadFixture } from './test-utils.js';
|
||||
|
||||
// TODO: fix this tests in macOS
|
||||
if (!isMacOS) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { after, describe, before, it } from 'node:test';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Development Routing', () => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import * as fs from 'node:fs';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('outDir set to project root', async () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { after, describe, before, it } from 'node:test';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import { load as cheerioLoad } from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { after, describe, before, it } from 'node:test';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Errors in JavaScript', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { after, describe, before, it } from 'node:test';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Can handle errors that are not instanceof Error', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, after, it } from 'node:test';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { fixLineEndings, loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, after, it } from 'node:test';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
import testAdapter from './test-adapter.js';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Experimental Content Collections cache inlineStylesheets', () => {
|
||||
let fixture;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, after, it } from 'node:test';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture, isWindows } from './test-utils.js';
|
||||
import testAdapter from './test-adapter.js';
|
||||
import { isWindows, loadFixture } from './test-utils.js';
|
||||
|
||||
if (!isWindows) {
|
||||
describe('Experimental Content Collections cache - render()', () => {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import * as devalue from 'devalue';
|
||||
import * as cheerio from 'cheerio';
|
||||
import assert from 'node:assert/strict';
|
||||
import { describe, before, after, it } from 'node:test';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import * as devalue from 'devalue';
|
||||
import testAdapter from './test-adapter.js';
|
||||
import { preventNodeBuiltinDependencyPlugin } from './test-plugins.js';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Experimental Content Collections cache', () => {
|
||||
describe('Query', () => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { loadFixture } from './test-utils.js';
|
||||
import assert from 'node:assert/strict';
|
||||
import { describe, it } from 'node:test';
|
||||
import testAdapter from './test-adapter.js';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Adapter', () => {
|
||||
let fixture;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { describe, before, it } from 'node:test';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue