0
Fork 0
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:
Emanuele Stoppa 2024-02-21 14:08:19 +00:00 committed by GitHub
parent 8e51bf9ea9
commit 062623438b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
296 changed files with 589 additions and 481 deletions

16
biome.json Normal file
View 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
}
}

View file

@ -13,10 +13,10 @@
"build:ci": "turbo run build:ci --filter=astro --filter=create-astro --filter=\"@astrojs/*\" --filter=\"@benchmark/*\"", "build:ci": "turbo run build:ci --filter=astro --filter=create-astro --filter=\"@astrojs/*\" --filter=\"@benchmark/*\"",
"build:examples": "turbo run build --filter=\"@example/*\"", "build:examples": "turbo run build --filter=\"@example/*\"",
"dev": "turbo run dev --concurrency=40 --parallel --filter=astro --filter=create-astro --filter=\"@astrojs/*\" --filter=\"@benchmark/*\"", "dev": "turbo run dev --concurrency=40 --parallel --filter=astro --filter=create-astro --filter=\"@astrojs/*\" --filter=\"@benchmark/*\"",
"format": "pnpm run format:code", "format": "pnpm run format:code && pnpm run format:imports",
"format:ci": "pnpm run format:code", "format:ci": "pnpm run format:code && pnpm run format:imports",
"format:code": "prettier -w \"**/*\" --ignore-unknown --cache", "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": "turbo run test --concurrency=1 --filter=astro --filter=create-astro --filter=\"@astrojs/*\"",
"test:match": "cd packages/astro && pnpm run test:match", "test:match": "cd packages/astro && pnpm run test:match",
"test:unit": "cd packages/astro && pnpm run test:unit", "test:unit": "cd packages/astro && pnpm run test:unit",
@ -45,6 +45,7 @@
}, },
"packageManager": "pnpm@8.6.12", "packageManager": "pnpm@8.6.12",
"dependencies": { "dependencies": {
"@biomejs/biome": "^1.5.3",
"astro-benchmark": "workspace:*" "astro-benchmark": "workspace:*"
}, },
"devDependencies": { "devDependencies": {

View file

@ -1,8 +1,8 @@
import assert from 'node:assert/strict'; import assert from 'node:assert/strict';
import { describe, it } from 'node:test'; import { describe, it } from 'node:test';
import { phpFeedItem, web1FeedItem } from './test-utils.js';
import { pagesGlobToRssItems } from '../dist/index.js'; import { pagesGlobToRssItems } from '../dist/index.js';
import { phpFeedItem, web1FeedItem } from './test-utils.js';
describe('pagesGlobToRssItems', () => { describe('pagesGlobToRssItems', () => {
it('should generate on valid result', async () => { it('should generate on valid result', async () => {

View file

@ -6,6 +6,7 @@ import rss, { getRssString } from '../dist/index.js';
import { rssSchema } from '../dist/schema.js'; import { rssSchema } from '../dist/schema.js';
import { import {
description, description,
parseXmlString,
phpFeedItem, phpFeedItem,
phpFeedItemWithContent, phpFeedItemWithContent,
phpFeedItemWithCustomData, phpFeedItemWithCustomData,
@ -14,7 +15,6 @@ import {
web1FeedItem, web1FeedItem,
web1FeedItemWithAllData, web1FeedItemWithAllData,
web1FeedItemWithContent, web1FeedItemWithContent,
parseXmlString,
} from './test-utils.js'; } from './test-utils.js';
// note: I spent 30 minutes looking for a nice node-based snapshot tool // note: I spent 30 minutes looking for a nice node-based snapshot tool

View file

@ -1,5 +1,5 @@
import { expect } from '@playwright/test'; import { expect } from '@playwright/test';
import { testFactory, getErrorOverlayContent } from './test-utils.js'; import { getErrorOverlayContent, testFactory } from './test-utils.js';
const test = testFactory({ const test = testFactory({
root: './fixtures/error-cyclic/', root: './fixtures/error-cyclic/',

View file

@ -1,5 +1,5 @@
import { expect } from '@playwright/test'; import { expect } from '@playwright/test';
import { testFactory, getErrorOverlayContent } from './test-utils.js'; import { getErrorOverlayContent, testFactory } from './test-utils.js';
const test = testFactory({ const test = testFactory({
root: './fixtures/error-sass/', root: './fixtures/error-sass/',

View file

@ -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'; import { loadFixture, waitForHydrate } from './test-utils.js';
const test = base.extend({ const test = base.extend({

View file

@ -1,5 +1,5 @@
import { prepareTestFactory } from './shared-component-tests.js';
import { expect } from '@playwright/test'; import { expect } from '@playwright/test';
import { prepareTestFactory } from './shared-component-tests.js';
const { test, createTests } = prepareTestFactory({ root: './fixtures/vue-component/' }); const { test, createTests } = prepareTestFactory({ root: './fixtures/vue-component/' });
const config = { const config = {

View file

@ -5,7 +5,7 @@
*/ */
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { isWindows, loadFixture } from './test-utils.js'; import { isWindows, loadFixture } from './test-utils.js';

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import testAdapter from './test-adapter.js'; import testAdapter from './test-adapter.js';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,8 +1,8 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js';
import srcsetParse from 'srcset-parse'; import srcsetParse from 'srcset-parse';
import { loadFixture } from './test-utils.js';
// This package isn't real ESM, so have to coerce it // This package isn't real ESM, so have to coerce it
const matchSrcset = srcsetParse.default; const matchSrcset = srcsetParse.default;

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,6 +1,6 @@
import { load as cheerioLoad } from 'cheerio';
import assert from 'node:assert/strict'; import assert from 'node:assert/strict';
import { before, describe, it } from 'node:test'; import { before, describe, it } from 'node:test';
import { load as cheerioLoad } from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';
describe('Client only components', () => { describe('Client only components', () => {

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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'; import { loadFixture } from './test-utils.js';
describe('Component bundling', () => { describe('Component bundling', () => {

View file

@ -1,6 +1,6 @@
import * as cheerio from 'cheerio';
import assert from 'node:assert/strict'; import assert from 'node:assert/strict';
import { before, describe, it } from 'node:test'; import { before, describe, it } from 'node:test';
import * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';
describe('<Code>', () => { describe('<Code>', () => {

View file

@ -1,8 +1,8 @@
import * as cheerio from 'cheerio';
import assert from 'node:assert/strict'; import assert from 'node:assert/strict';
import { after, before, describe, it } from 'node:test'; 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 testAdapter from './test-adapter.js';
import { loadFixture } from './test-utils.js';
describe('Astro.cookies', () => { describe('Astro.cookies', () => {
/** @type {import('./test-utils').Fixture} */ /** @type {import('./test-utils').Fixture} */

View file

@ -1,6 +1,6 @@
import * as cheerio from 'cheerio';
import assert from 'node:assert/strict'; import assert from 'node:assert/strict';
import { before, describe, it } from 'node:test'; import { before, describe, it } from 'node:test';
import * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';
// note: the hashes should be deterministic, but updating the file contents will change hashes // note: the hashes should be deterministic, but updating the file contents will change hashes

View file

@ -1,6 +1,6 @@
import * as cheerio from 'cheerio';
import assert from 'node:assert/strict'; import assert from 'node:assert/strict';
import { before, describe, it } from 'node:test'; import { before, describe, it } from 'node:test';
import * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';
describe('Directives', async () => { describe('Directives', async () => {

View file

@ -1,6 +1,6 @@
import * as cheerio from 'cheerio';
import assert from 'node:assert/strict'; import assert from 'node:assert/strict';
import { before, describe, it } from 'node:test'; import { before, describe, it } from 'node:test';
import * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';
describe('Doctype', () => { describe('Doctype', () => {

View file

@ -1,6 +1,6 @@
import * as cheerio from 'cheerio';
import assert from 'node:assert/strict'; import assert from 'node:assert/strict';
import { before, describe, it } from 'node:test'; import { before, describe, it } from 'node:test';
import * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';
describe('Dynamic components', () => { describe('Dynamic components', () => {

View file

@ -1,7 +1,7 @@
import assert from 'node:assert/strict'; import assert from 'node:assert/strict';
import { after, before, describe, it } from 'node:test'; import { after, before, describe, it } from 'node:test';
import { loadFixture } from './test-utils.js';
import * as cheerio from 'cheerio'; import * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js';
describe('Environment Variables', () => { describe('Environment Variables', () => {
/** @type {import('./test-utils').Fixture} */ /** @type {import('./test-utils').Fixture} */

View file

@ -1,6 +1,6 @@
import * as cheerio from 'cheerio';
import assert from 'node:assert/strict'; import assert from 'node:assert/strict';
import { before, describe, it } from 'node:test'; import { before, describe, it } from 'node:test';
import * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';
describe('Expressions', () => { describe('Expressions', () => {

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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'; import { loadFixture } from './test-utils.js';
describe('External file references', () => { describe('External file references', () => {

View file

@ -1,6 +1,6 @@
import * as cheerio from 'cheerio';
import assert from 'node:assert/strict'; import assert from 'node:assert/strict';
import { before, describe, it } from 'node:test'; import { before, describe, it } from 'node:test';
import * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';
describe('Dynamic component fallback', () => { describe('Dynamic component fallback', () => {

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,6 +1,6 @@
import * as cheerio from 'cheerio';
import assert from 'node:assert/strict'; import assert from 'node:assert/strict';
import { after, afterEach, before, describe, it } from 'node:test'; import { after, afterEach, before, describe, it } from 'node:test';
import * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';
describe('getStaticPaths - build calls', () => { describe('getStaticPaths - build calls', () => {

View file

@ -1,6 +1,6 @@
import * as cheerio from 'cheerio';
import assert from 'node:assert/strict'; import assert from 'node:assert/strict';
import { after, before, describe, it } from 'node:test'; import { after, before, describe, it } from 'node:test';
import * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';
describe('Astro Global', () => { describe('Astro Global', () => {

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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'; import { loadFixture } from './test-utils.js';
const FIXTURE_ROOT = './fixtures/astro-markdown-frontmatter-injection/'; const FIXTURE_ROOT = './fixtures/astro-markdown-frontmatter-injection/';

View file

@ -1,9 +1,9 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js';
import addClasses from './fixtures/astro-markdown-plugins/add-classes.mjs'; import addClasses from './fixtures/astro-markdown-plugins/add-classes.mjs';
import { loadFixture } from './test-utils.js';
const defaultMarkdownConfig = { const defaultMarkdownConfig = {
gfm: true, gfm: true,

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,7 +1,7 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture, fixLineEndings } from './test-utils.js'; import { fixLineEndings, loadFixture } from './test-utils.js';
const FIXTURE_ROOT = './fixtures/astro-markdown/'; const FIXTURE_ROOT = './fixtures/astro-markdown/';

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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'; import { loadFixture } from './test-utils.js';
// Asset bundling // Asset bundling

View file

@ -1,6 +1,6 @@
import * as cheerio from 'cheerio';
import assert from 'node:assert/strict'; import assert from 'node:assert/strict';
import { before, describe, it } from 'node:test'; import { before, describe, it } from 'node:test';
import * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';
describe('Object style', async () => { describe('Object style', async () => {

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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'; import { loadFixture } from './test-utils.js';
describe('build format', () => { describe('build format', () => {

View file

@ -1,7 +1,7 @@
import * as cheerio from 'cheerio';
import assert from 'node:assert/strict'; import assert from 'node:assert/strict';
import { after, before, describe, it } from 'node:test'; 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', () => { describe('Pages', () => {
let fixture; let fixture;

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,6 +1,6 @@
import * as cheerio from 'cheerio';
import assert from 'node:assert/strict'; import assert from 'node:assert/strict';
import { after, before, describe, it } from 'node:test'; import { after, before, describe, it } from 'node:test';
import * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';
describe('Partial HTML', async () => { describe('Partial HTML', async () => {

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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'; import { loadFixture } from './test-utils.js';
describe('Public', () => { describe('Public', () => {

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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'; import { loadFixture } from './test-utils.js';
// Asset bundling // Asset bundling

View file

@ -1,6 +1,6 @@
import * as cheerio from 'cheerio';
import assert from 'node:assert/strict'; import assert from 'node:assert/strict';
import { after, before, describe, it } from 'node:test'; import { after, before, describe, it } from 'node:test';
import * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';
describe('Scripts (hoisted and not)', () => { describe('Scripts (hoisted and not)', () => {

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,6 +1,6 @@
import * as cheerio from 'cheerio';
import assert from 'node:assert/strict'; import assert from 'node:assert/strict';
import { before, describe, it } from 'node:test'; import { before, describe, it } from 'node:test';
import * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';
describe('Nested Slots', () => { describe('Nested Slots', () => {

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,9 +1,9 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js';
import { preact } from './fixtures/before-hydration/deps.mjs'; import { preact } from './fixtures/before-hydration/deps.mjs';
import testAdapter from './test-adapter.js'; import testAdapter from './test-adapter.js';
import { loadFixture } from './test-utils.js';
describe('Astro Scripts before-hydration', () => { describe('Astro Scripts before-hydration', () => {
describe('SSG', () => { describe('SSG', () => {

View file

@ -1,9 +1,9 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js';
import { preact } from './fixtures/before-hydration/deps.mjs'; import { preact } from './fixtures/before-hydration/deps.mjs';
import testAdapter from './test-adapter.js'; import testAdapter from './test-adapter.js';
import { loadFixture } from './test-utils.js';
describe('build assets (static)', () => { describe('build assets (static)', () => {
describe('with default configuration', () => { describe('with default configuration', () => {

View file

@ -1,12 +1,12 @@
import assert from 'node:assert/strict'; 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 { promises as fs, readFileSync } from 'node:fs';
import { fileURLToPath } from 'node:url';
import { isIPv4 } from 'node:net'; import { isIPv4 } from 'node:net';
import { join } from 'node:path'; import { join } from 'node:path';
import { Writable } from 'node:stream'; 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', () => { describe('astro cli', () => {
const cliServerLogSetupWithFixture = (flags, cmd) => { const cliServerLogSetupWithFixture = (flags, cmd) => {

View file

@ -1,8 +1,8 @@
import assert from 'node:assert/strict'; import assert from 'node:assert/strict';
import { describe, before, it, after } from 'node:test'; import { after, before, describe, it } from 'node:test';
import { loadFixture } from './test-utils.js';
import testAdapter from './test-adapter.js';
import * as cheerio from 'cheerio'; import * as cheerio from 'cheerio';
import testAdapter from './test-adapter.js';
import { loadFixture } from './test-utils.js';
describe('Astro.clientAddress', () => { describe('Astro.clientAddress', () => {
describe('SSR', () => { describe('SSR', () => {

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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 { load as cheerioLoad } from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,7 +1,7 @@
import assert from 'node:assert/strict'; 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';
import testAdapter from './test-adapter.js'; import testAdapter from './test-adapter.js';
import { loadFixture } from './test-utils.js';
describe('AstroConfig - config.output', () => { describe('AstroConfig - config.output', () => {
describe(`output: 'server'`, () => { describe(`output: 'server'`, () => {

View file

@ -3,7 +3,7 @@
*/ */
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,5 +1,5 @@
import * as assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { fixLineEndings, loadFixture } from './test-utils.js'; import { fixLineEndings, loadFixture } from './test-utils.js';

View file

@ -1,8 +1,8 @@
import * as assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture, isWindows } from './test-utils.js';
import testAdapter from './test-adapter.js'; import testAdapter from './test-adapter.js';
import { isWindows, loadFixture } from './test-utils.js';
if (!isWindows) { if (!isWindows) {
describe(); describe();

View file

@ -1,10 +1,10 @@
import * as devalue from 'devalue';
import * as cheerio from 'cheerio';
import assert from 'node:assert/strict'; 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'; import * as cheerio from 'cheerio';
import * as devalue from 'devalue';
import testAdapter from './test-adapter.js'; import testAdapter from './test-adapter.js';
import { preventNodeBuiltinDependencyPlugin } from './test-plugins.js'; import { preventNodeBuiltinDependencyPlugin } from './test-plugins.js';
import { loadFixture } from './test-utils.js';
describe('Content Collections', () => { describe('Content Collections', () => {
describe('Query', () => { describe('Query', () => {

View file

@ -1,7 +1,7 @@
import assert from 'node:assert/strict'; 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 { 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 { Logger } from '../dist/core/logger/core.js';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,7 +1,7 @@
import assert from 'node:assert/strict'; 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 { 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 { Logger } from '../dist/core/logger/core.js';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,8 +1,8 @@
import assert from 'node:assert/strict'; 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 { basename } from 'node:path';
import { Writable } from 'node:stream'; import { Writable } from 'node:stream';
import { after, before, describe, it } from 'node:test';
import * as cheerio from 'cheerio';
import parseSrcset from 'parse-srcset'; import parseSrcset from 'parse-srcset';
import { removeDir } from '../dist/core/fs/index.js'; import { removeDir } from '../dist/core/fs/index.js';
import { Logger } from '../dist/core/logger/core.js'; import { Logger } from '../dist/core/logger/core.js';

View file

@ -1,5 +1,5 @@
import * as assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,5 +1,5 @@
import * as assert from 'node:assert/strict'; 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'; import { loadFixture } from './test-utils.js';
const cssAssetReferenceRegExp = /_astro\/[A-Za-z\d\-]+\.[\da-f]{8}\.css/g; const cssAssetReferenceRegExp = /_astro\/[A-Za-z\d\-]+\.[\da-f]{8}\.css/g;

View file

@ -1,5 +1,5 @@
import * as assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,8 +1,8 @@
import * as assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js';
import testAdapter from './test-adapter.js'; import testAdapter from './test-adapter.js';
import { loadFixture } from './test-utils.js';
describe('Setting inlineStylesheets to never in static output', () => { describe('Setting inlineStylesheets to never in static output', () => {
let fixture; let fixture;

View file

@ -1,5 +1,5 @@
import * as assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,5 +1,5 @@
import * as assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,5 +1,5 @@
import * as assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,8 +1,8 @@
import * as assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js';
import testAdapter from './test-adapter.js'; import testAdapter from './test-adapter.js';
import { loadFixture } from './test-utils.js';
describe('CSS production ordering', () => { describe('CSS production ordering', () => {
function getLinks(html) { function getLinks(html) {

View file

@ -1,7 +1,7 @@
import assert from 'node:assert/strict';
import { after, before, describe, it } from 'node:test';
import * as cheerio from 'cheerio'; import * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';
import assert from 'node:assert/strict';
import { after, describe, before, it } from 'node:test';
describe('Custom 404.html', () => { describe('Custom 404.html', () => {
let fixture; let fixture;

View file

@ -1,6 +1,6 @@
import { loadFixture } from './test-utils.js';
import assert from 'node:assert/strict'; 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]) { for (const caseNumber of [1, 2, 3, 4]) {
describe(`Custom 404 with implicit rerouting - Case #${caseNumber}`, () => { describe(`Custom 404 with implicit rerouting - Case #${caseNumber}`, () => {

View file

@ -1,6 +1,6 @@
import { loadFixture } from './test-utils.js';
import assert from 'node:assert/strict'; 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('Custom 404 with injectRoute from dependency', () => {
describe('build', () => { describe('build', () => {

View file

@ -1,7 +1,7 @@
import assert from 'node:assert/strict';
import { after, before, describe, it } from 'node:test';
import * as cheerio from 'cheerio'; import * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; 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', () => { describe('Custom 404 with injectRoute', () => {
let fixture; let fixture;

View file

@ -1,7 +1,7 @@
import assert from 'node:assert/strict';
import { after, before, describe, it } from 'node:test';
import * as cheerio from 'cheerio'; import * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';
import assert from 'node:assert/strict';
import { after, describe, before, it } from 'node:test';
describe('Custom 404 Markdown', () => { describe('Custom 404 Markdown', () => {
let fixture; let fixture;

View file

@ -1,7 +1,7 @@
import assert from 'node:assert/strict';
import { after, before, describe, it } from 'node:test';
import * as cheerio from 'cheerio'; import * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; 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', () => { describe('Custom 404 with Static', () => {
let fixture; let fixture;

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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'; import { loadFixture } from './test-utils.js';
describe('custom the assets name function', () => { describe('custom the assets name function', () => {

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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'; import { loadFixture } from './test-utils.js';
const authorIds = ['Ben Holmes', 'Fred K Schott', 'Nate Moore']; const authorIds = ['Ben Holmes', 'Fred K Schott', 'Nate Moore'];

View file

@ -1,6 +1,6 @@
import assert from 'node:assert/strict'; import assert from 'node:assert/strict';
import { after, describe, before, it } from 'node:test'; import { after, before, describe, it } from 'node:test';
import { loadFixture, isMacOS } from './test-utils.js'; import { isMacOS, loadFixture } from './test-utils.js';
// TODO: fix this tests in macOS // TODO: fix this tests in macOS
if (!isMacOS) { if (!isMacOS) {

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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'; import { loadFixture } from './test-utils.js';
describe('Development Routing', () => { describe('Development Routing', () => {

View file

@ -1,6 +1,6 @@
import assert from 'node:assert/strict'; import assert from 'node:assert/strict';
import { describe, before, it } from 'node:test';
import * as fs from 'node:fs'; import * as fs from 'node:fs';
import { before, describe, it } from 'node:test';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';
describe('outDir set to project root', async () => { describe('outDir set to project root', async () => {

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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 { load as cheerioLoad } from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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'; import { loadFixture } from './test-utils.js';
describe('Errors in JavaScript', () => { describe('Errors in JavaScript', () => {

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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'; import { loadFixture } from './test-utils.js';
describe('Can handle errors that are not instanceof Error', () => { describe('Can handle errors that are not instanceof Error', () => {

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { fixLineEndings, loadFixture } from './test-utils.js'; import { fixLineEndings, loadFixture } from './test-utils.js';

View file

@ -1,8 +1,8 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js';
import testAdapter from './test-adapter.js'; import testAdapter from './test-adapter.js';
import { loadFixture } from './test-utils.js';
describe('Experimental Content Collections cache inlineStylesheets', () => { describe('Experimental Content Collections cache inlineStylesheets', () => {
let fixture; let fixture;

View file

@ -1,8 +1,8 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture, isWindows } from './test-utils.js';
import testAdapter from './test-adapter.js'; import testAdapter from './test-adapter.js';
import { isWindows, loadFixture } from './test-utils.js';
if (!isWindows) { if (!isWindows) {
describe('Experimental Content Collections cache - render()', () => { describe('Experimental Content Collections cache - render()', () => {

View file

@ -1,10 +1,10 @@
import * as devalue from 'devalue';
import * as cheerio from 'cheerio';
import assert from 'node:assert/strict'; import assert from 'node:assert/strict';
import { describe, before, after, it } from 'node:test'; import { after, before, describe, it } from 'node:test';
import { loadFixture } from './test-utils.js'; import * as cheerio from 'cheerio';
import * as devalue from 'devalue';
import testAdapter from './test-adapter.js'; import testAdapter from './test-adapter.js';
import { preventNodeBuiltinDependencyPlugin } from './test-plugins.js'; import { preventNodeBuiltinDependencyPlugin } from './test-plugins.js';
import { loadFixture } from './test-utils.js';
describe('Experimental Content Collections cache', () => { describe('Experimental Content Collections cache', () => {
describe('Query', () => { describe('Query', () => {

View file

@ -1,7 +1,7 @@
import { loadFixture } from './test-utils.js';
import assert from 'node:assert/strict'; import assert from 'node:assert/strict';
import { describe, it } from 'node:test'; import { describe, it } from 'node:test';
import testAdapter from './test-adapter.js'; import testAdapter from './test-adapter.js';
import { loadFixture } from './test-utils.js';
describe('Adapter', () => { describe('Adapter', () => {
let fixture; let fixture;

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

View file

@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; 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 * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';

Some files were not shown because too many files have changed in this diff Show more