From 062623438b5dfd66682a967edc7b7c91bd29e888 Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Wed, 21 Feb 2024 14:08:19 +0000 Subject: [PATCH] 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 --------- Co-authored-by: Bjorn Lu --- biome.json | 16 ++++ package.json | 7 +- .../test/pagesGlobToRssItems.test.js | 2 +- packages/astro-rss/test/rss.test.js | 2 +- packages/astro/e2e/error-cyclic.test.js | 2 +- packages/astro/e2e/error-sass.test.js | 2 +- packages/astro/e2e/nested-recursive.test.js | 2 +- packages/astro/e2e/vue-component.test.js | 2 +- packages/astro/test/0-css.test.js | 2 +- .../test/alias-tsconfig-baseurl-only.test.js | 2 +- packages/astro/test/alias-tsconfig.test.js | 2 +- packages/astro/test/alias.test.js | 2 +- packages/astro/test/asset-url-base.test.js | 2 +- .../astro/test/astro-assets-prefix.test.js | 2 +- packages/astro/test/astro-assets.test.js | 4 +- packages/astro/test/astro-attrs.test.js | 2 +- packages/astro/test/astro-basic.test.js | 2 +- packages/astro/test/astro-children.test.js | 2 +- packages/astro/test/astro-class-list.test.js | 2 +- packages/astro/test/astro-client-only.test.js | 2 +- .../test/astro-component-bundling.test.js | 2 +- .../astro/test/astro-component-code.test.js | 2 +- packages/astro/test/astro-cookies.test.js | 4 +- .../astro/test/astro-css-bundling.test.js | 2 +- packages/astro/test/astro-directives.test.js | 2 +- packages/astro/test/astro-doctype.test.js | 2 +- packages/astro/test/astro-dynamic.test.js | 2 +- packages/astro/test/astro-envs.test.js | 2 +- packages/astro/test/astro-expr.test.js | 2 +- .../astro/test/astro-external-files.test.js | 2 +- packages/astro/test/astro-fallback.test.js | 2 +- packages/astro/test/astro-generator.test.js | 2 +- .../astro/test/astro-get-static-paths.test.js | 2 +- packages/astro/test/astro-global.test.js | 2 +- packages/astro/test/astro-head.test.js | 2 +- ...tro-markdown-frontmatter-injection.test.js | 2 +- .../astro/test/astro-markdown-plugins.test.js | 4 +- .../test/astro-markdown-remarkRehype.test.js | 2 +- .../astro/test/astro-markdown-shiki.test.js | 2 +- packages/astro/test/astro-markdown.test.js | 4 +- .../astro/test/astro-not-response.test.js | 2 +- .../astro/test/astro-object-style.test.js | 2 +- .../astro/test/astro-pageDirectoryUrl.test.js | 2 +- packages/astro/test/astro-pages.test.js | 4 +- .../test/astro-pagination-root-spread.test.js | 2 +- packages/astro/test/astro-pagination.test.js | 2 +- .../astro/test/astro-partial-html.test.js | 2 +- packages/astro/test/astro-public.test.js | 2 +- packages/astro/test/astro-response.test.js | 2 +- packages/astro/test/astro-scripts.test.js | 2 +- .../astro/test/astro-slot-with-client.test.js | 2 +- .../astro/test/astro-slots-nested.test.js | 2 +- packages/astro/test/astro-slots.test.js | 2 +- packages/astro/test/before-hydration.test.js | 4 +- packages/astro/test/build-assets.test.js | 4 +- packages/astro/test/cli.test.js | 8 +- packages/astro/test/client-address.test.js | 6 +- packages/astro/test/code-component.test.js | 2 +- packages/astro/test/component-library.test.js | 2 +- packages/astro/test/config-mode.test.js | 4 +- .../astro/test/config-vite-css-target.test.js | 2 +- packages/astro/test/config-vite.test.js | 2 +- .../content-collection-references.test.js | 2 +- .../test/content-collections-render.test.js | 4 +- .../astro/test/content-collections.test.js | 8 +- .../astro/test/core-image-infersize.test.js | 4 +- .../test/core-image-remark-imgattr.test.js | 4 +- packages/astro/test/core-image.test.js | 4 +- packages/astro/test/css-assets.test.js | 2 +- .../test/css-dangling-references.test.js | 2 +- .../astro/test/css-import-as-inline.test.js | 2 +- .../astro/test/css-inline-stylesheets.test.js | 4 +- packages/astro/test/css-no-code-split.test.js | 2 +- packages/astro/test/css-order-import.test.js | 2 +- packages/astro/test/css-order-layout.test.js | 2 +- packages/astro/test/css-order.test.js | 4 +- packages/astro/test/custom-404-html.test.js | 4 +- .../custom-404-implicit-rerouting.test.js | 4 +- .../test/custom-404-injected-from-dep.test.js | 4 +- .../astro/test/custom-404-injected.test.js | 4 +- packages/astro/test/custom-404-md.test.js | 4 +- packages/astro/test/custom-404-static.test.js | 4 +- .../astro/test/custom-assets-name.test.js | 2 +- packages/astro/test/data-collections.test.js | 2 +- packages/astro/test/debug-component.test.js | 4 +- packages/astro/test/dev-routing.test.js | 2 +- packages/astro/test/dont-delete-root.test.js | 2 +- .../test/dynamic-endpoint-collision.test.js | 2 +- .../test/dynamic-route-build-file.test.js | 2 +- packages/astro/test/entry-file-names.test.js | 2 +- packages/astro/test/error-bad-js.test.js | 2 +- packages/astro/test/error-non-error.test.js | 2 +- ...ntal-content-collection-references.test.js | 2 +- ...collections-css-inline-stylesheets.test.js | 4 +- ...imental-content-collections-render.test.js | 4 +- .../experimental-content-collections.test.js | 8 +- packages/astro/test/featuresSupport.test.js | 2 +- packages/astro/test/fetch.test.js | 2 +- packages/astro/test/fontsource.test.js | 2 +- .../astro/test/get-static-paths-pages.test.js | 2 +- packages/astro/test/glob-pages-css.test.js | 2 +- packages/astro/test/head-injection.test.js | 2 +- packages/astro/test/hoisted-imports.test.js | 4 +- packages/astro/test/html-component.test.js | 2 +- .../astro/test/html-escape-complex.test.js | 2 +- packages/astro/test/html-escape.test.js | 2 +- packages/astro/test/html-page.test.js | 2 +- packages/astro/test/html-slots.test.js | 2 +- packages/astro/test/hydration-race.test.js | 2 +- packages/astro/test/i18n-routing.test.js | 4 +- packages/astro/test/image-deletion.test.js | 2 +- packages/astro/test/import-ts-with-js.test.js | 2 +- packages/astro/test/impostor-mdx-file.test.js | 2 +- .../integration-add-page-extension.test.js | 2 +- .../test/integration-server-setup.test.js | 2 +- packages/astro/test/jsx.test.js | 2 +- packages/astro/test/lazy-layout.test.js | 2 +- packages/astro/test/lit-element.test.js | 2 +- packages/astro/test/markdown.test.js | 2 +- packages/astro/test/middleware.test.js | 4 +- packages/astro/test/minification-html.test.js | 4 +- .../astro/test/multiple-renderers.test.js | 2 +- packages/astro/test/non-ascii-path.test.js | 2 +- packages/astro/test/non-html-pages.test.js | 2 +- packages/astro/test/partials.test.js | 2 +- .../test/preact-compat-component.test.js | 2 +- packages/astro/test/preview-routing.test.js | 2 +- packages/astro/test/public-base-404.test.js | 2 +- packages/astro/test/redirects.test.js | 4 +- packages/astro/test/routing-priority.test.js | 2 +- .../astro/test/scoped-style-strategy.test.js | 2 +- packages/astro/test/set-html.test.js | 2 +- packages/astro/test/solid-component.test.js | 2 +- .../astro/test/space-in-folder-name.test.js | 2 +- ...special-chars-in-component-imports.test.js | 2 +- .../test/ssr-adapter-build-config.test.js | 4 +- packages/astro/test/ssr-api-route.test.js | 2 +- packages/astro/test/ssr-assets.test.js | 4 +- packages/astro/test/ssr-dynamic.test.js | 4 +- packages/astro/test/ssr-env.test.js | 4 +- packages/astro/test/ssr-error-pages.test.js | 6 +- .../astro/test/ssr-hoisted-script.test.js | 4 +- packages/astro/test/ssr-large-array.test.js | 4 +- packages/astro/test/ssr-lit.test.js | 4 +- packages/astro/test/ssr-locals.test.js | 4 +- packages/astro/test/ssr-manifest.test.js | 6 +- packages/astro/test/ssr-markdown.test.js | 4 +- packages/astro/test/ssr-params.test.js | 4 +- packages/astro/test/ssr-partytown.test.js | 4 +- .../ssr-prerender-get-static-paths.test.js | 2 +- packages/astro/test/ssr-prerender.test.js | 4 +- packages/astro/test/ssr-preview.test.js | 4 +- packages/astro/test/ssr-request.test.js | 4 +- packages/astro/test/ssr-response.test.js | 4 +- packages/astro/test/ssr-scripts.test.js | 4 +- .../astro/test/ssr-split-manifest.test.js | 10 +- .../test/static-build-code-component.test.js | 2 +- .../test/static-build-frameworks.test.js | 4 +- packages/astro/test/static-build.test.js | 4 +- packages/astro/test/streaming.test.js | 2 +- packages/astro/test/svelte-component.test.js | 2 +- packages/astro/test/third-party-astro.test.js | 2 +- packages/astro/test/units/app/headers.test.js | 2 +- .../test/units/assets/remote-pattern.test.js | 6 +- .../test/units/build/static-build.test.js | 2 +- .../test/units/compile/invalid-css.test.js | 6 +- .../test/units/config/config-resolve.test.js | 4 +- .../test/units/config/config-server.test.js | 4 +- .../test/units/config/config-tsconfig.test.js | 2 +- .../test/units/config/config-validate.test.js | 10 +- .../astro/test/units/config/format.test.js | 4 +- .../content-collections/error-map.test.js | 8 +- .../content-collections/frontmatter.test.js | 2 +- .../get-entry-info.test.js | 4 +- .../get-entry-type.test.js | 2 +- .../astro/test/units/cookies/delete.test.js | 2 +- .../astro/test/units/cookies/error.test.js | 2 +- packages/astro/test/units/cookies/get.test.js | 2 +- packages/astro/test/units/cookies/has.test.js | 2 +- packages/astro/test/units/cookies/set.test.js | 2 +- packages/astro/test/units/dev/base.test.js | 2 +- .../collections-mixed-content-errors.test.js | 2 +- .../units/dev/collections-renderentry.test.js | 4 +- packages/astro/test/units/dev/dev.test.js | 4 +- .../test/units/dev/head-injection.test.js | 4 +- .../astro/test/units/dev/hydration.test.js | 2 +- packages/astro/test/units/dev/restart.test.js | 4 +- packages/astro/test/units/dev/styles.test.js | 4 +- .../astro/test/units/i18n/astro_i18n.test.js | 16 ++-- .../astro/test/units/integrations/api.test.js | 8 +- .../astro/test/units/logger/locale.test.js | 2 +- .../astro/test/units/render/chunk.test.js | 4 +- .../test/units/render/components.test.js | 4 +- packages/astro/test/units/render/head.test.js | 12 +-- packages/astro/test/units/render/jsx.test.js | 10 +- .../test/units/routing/endpoints.test.js | 10 +- .../astro/test/units/routing/manifest.test.js | 4 +- .../test/units/routing/route-matching.test.js | 22 ++--- .../units/routing/route-sanitization.test.js | 12 +-- .../test/units/routing/trailing-slash.test.js | 10 +- .../test/units/runtime/astro-global.test.js | 2 +- .../controller.test.js | 2 +- .../vite-plugin-astro-server/request.test.js | 6 +- .../vite-plugin-astro-server/response.test.js | 10 +- .../units/vite-plugin-astro/compile.test.js | 6 +- .../test/units/vite-plugin-astro/hmr.test.js | 2 +- .../units/vite-plugin-scanner/scan.test.js | 2 +- packages/astro/test/view-transitions.test.js | 2 +- packages/astro/test/vue-component.test.js | 2 +- packages/create-astro/test/context.test.js | 2 +- .../create-astro/test/dependencies.test.js | 2 +- packages/create-astro/test/git.test.js | 4 +- packages/create-astro/test/typescript.test.js | 6 +- packages/create-astro/test/verify.test.js | 2 +- packages/integrations/lit/test/sass.test.js | 2 +- packages/integrations/lit/test/server.test.js | 6 +- .../markdoc/test/content-collections.test.js | 6 +- .../markdoc/test/headings.test.js | 4 +- .../markdoc/test/image-assets.test.js | 4 +- .../markdoc/test/propagated-assets.test.js | 4 +- .../markdoc/test/render-html.test.js | 4 +- .../integrations/markdoc/test/render.test.js | 4 +- .../markdoc/test/syntax-highlighting.test.js | 12 +-- .../markdoc/test/variables.test.js | 4 +- .../mdx/test/css-head-mdx.test.js | 6 +- .../mdx/test/invalid-mdx-component.test.js | 2 +- .../mdx-astro-markdown-remarkRehype.test.js | 2 +- .../mdx/test/mdx-component.test.js | 2 +- .../integrations/mdx/test/mdx-escape.test.js | 2 +- .../test/mdx-frontmatter-injection.test.js | 2 +- .../mdx/test/mdx-frontmatter.test.js | 2 +- .../mdx/test/mdx-get-headings.test.js | 2 +- .../mdx/test/mdx-get-static-paths.test.js | 4 +- .../integrations/mdx/test/mdx-images.test.js | 2 +- .../mdx/test/mdx-infinite-loop.test.js | 2 +- .../integrations/mdx/test/mdx-math.test.js | 8 +- .../mdx/test/mdx-namespace.test.js | 2 +- .../mdx/test/mdx-optimize.test.js | 2 +- .../integrations/mdx/test/mdx-page.test.js | 2 +- .../integrations/mdx/test/mdx-plugins.test.js | 8 +- .../mdx/test/mdx-plus-react.test.js | 2 +- .../mdx/test/mdx-script-style-raw.test.js | 4 +- .../integrations/mdx/test/mdx-slots.test.js | 2 +- .../mdx/test/mdx-syntax-highlighting.test.js | 6 +- .../mdx/test/mdx-url-export.test.js | 2 +- .../mdx/test/mdx-vite-env-vars.test.js | 2 +- .../mdx/test/remark-imgattr.test.js | 2 +- .../integrations/node/test/api-route.test.js | 8 +- .../integrations/node/test/assets.test.js | 4 +- .../integrations/node/test/bad-urls.test.js | 2 +- .../integrations/node/test/encoded.test.js | 4 +- .../integrations/node/test/errors.test.js | 4 +- .../integrations/node/test/headers.test.js | 4 +- packages/integrations/node/test/image.test.js | 2 +- .../integrations/node/test/locals.test.js | 4 +- .../node/test/node-middleware.test.js | 6 +- .../node/test/prerender-404-500.test.js | 4 +- .../integrations/node/test/prerender.test.js | 4 +- .../node/test/url-protocol.test.js | 2 +- .../node/test/well-known-locations.test.js | 2 +- .../react/test/react-component.test.js | 2 +- .../sitemap/test/base-path.test.js | 2 +- .../sitemap/test/dynamic-path.test.js | 2 +- .../integrations/sitemap/test/filter.test.js | 2 +- .../integrations/sitemap/test/prefix.test.js | 4 +- .../integrations/sitemap/test/routes.test.js | 2 +- .../integrations/sitemap/test/ssr.test.js | 2 +- .../sitemap/test/staticPaths.test.js | 2 +- .../sitemap/test/trailing-slash.test.js | 2 +- .../integrations/tailwind/test/basic.test.js | 2 +- .../integrations/vercel/test/image.test.js | 2 +- packages/integrations/vercel/test/isr.test.js | 2 +- .../vercel/test/max-duration.test.js | 2 +- .../vercel/test/no-output.test.js | 2 +- .../test/prerendered-error-pages.test.js | 2 +- .../vercel/test/speed-insights.test.js | 2 +- .../integrations/vercel/test/split.test.js | 2 +- .../integrations/vercel/test/static.test.js | 2 +- .../vercel/test/streaming.test.js | 2 +- .../vercel/test/web-analytics.test.js | 2 +- .../vue/test/app-entrypoint-css.test.js | 4 +- .../vue/test/app-entrypoint.test.js | 4 +- packages/integrations/vue/test/basics.test.js | 4 +- .../markdown/remark/test/autolinking.test.js | 2 +- packages/markdown/remark/test/browser.test.js | 2 +- .../markdown/remark/test/entities.test.js | 2 +- packages/markdown/remark/test/plugins.test.js | 2 +- .../remark/test/remark-collect-images.test.js | 2 +- packages/telemetry/test/index.test.js | 2 +- .../underscore-redirects/test/astro.test.js | 2 +- .../underscore-redirects/test/print.test.js | 2 +- .../underscore-redirects/test/weight.test.js | 2 +- packages/upgrade/test/context.test.js | 2 +- packages/upgrade/test/install.test.js | 4 +- packages/upgrade/test/verify.test.js | 2 +- pnpm-lock.yaml | 91 +++++++++++++++++++ 296 files changed, 589 insertions(+), 481 deletions(-) create mode 100644 biome.json diff --git a/biome.json b/biome.json new file mode 100644 index 0000000000..d3d01f78d5 --- /dev/null +++ b/biome.json @@ -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 + } +} diff --git a/package.json b/package.json index d26d4fac25..b12affb585 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/packages/astro-rss/test/pagesGlobToRssItems.test.js b/packages/astro-rss/test/pagesGlobToRssItems.test.js index e3da7351b0..560ede268c 100644 --- a/packages/astro-rss/test/pagesGlobToRssItems.test.js +++ b/packages/astro-rss/test/pagesGlobToRssItems.test.js @@ -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 () => { diff --git a/packages/astro-rss/test/rss.test.js b/packages/astro-rss/test/rss.test.js index 02df32f481..2d5a0f6c81 100644 --- a/packages/astro-rss/test/rss.test.js +++ b/packages/astro-rss/test/rss.test.js @@ -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 diff --git a/packages/astro/e2e/error-cyclic.test.js b/packages/astro/e2e/error-cyclic.test.js index 32cbc050ac..84f4d1d1dc 100644 --- a/packages/astro/e2e/error-cyclic.test.js +++ b/packages/astro/e2e/error-cyclic.test.js @@ -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/', diff --git a/packages/astro/e2e/error-sass.test.js b/packages/astro/e2e/error-sass.test.js index a4e68f57b7..11862fb86e 100644 --- a/packages/astro/e2e/error-sass.test.js +++ b/packages/astro/e2e/error-sass.test.js @@ -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/', diff --git a/packages/astro/e2e/nested-recursive.test.js b/packages/astro/e2e/nested-recursive.test.js index 262cd67723..8271c65575 100644 --- a/packages/astro/e2e/nested-recursive.test.js +++ b/packages/astro/e2e/nested-recursive.test.js @@ -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({ diff --git a/packages/astro/e2e/vue-component.test.js b/packages/astro/e2e/vue-component.test.js index 5d0455dee6..ca491de908 100644 --- a/packages/astro/e2e/vue-component.test.js +++ b/packages/astro/e2e/vue-component.test.js @@ -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 = { diff --git a/packages/astro/test/0-css.test.js b/packages/astro/test/0-css.test.js index 4cc1d18645..e3f182b161 100644 --- a/packages/astro/test/0-css.test.js +++ b/packages/astro/test/0-css.test.js @@ -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'; diff --git a/packages/astro/test/alias-tsconfig-baseurl-only.test.js b/packages/astro/test/alias-tsconfig-baseurl-only.test.js index c1f79c6c09..20c2884ccb 100644 --- a/packages/astro/test/alias-tsconfig-baseurl-only.test.js +++ b/packages/astro/test/alias-tsconfig-baseurl-only.test.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'; diff --git a/packages/astro/test/alias-tsconfig.test.js b/packages/astro/test/alias-tsconfig.test.js index 006e127056..86853baf23 100644 --- a/packages/astro/test/alias-tsconfig.test.js +++ b/packages/astro/test/alias-tsconfig.test.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'; diff --git a/packages/astro/test/alias.test.js b/packages/astro/test/alias.test.js index e9f4ab6383..4e3b14a9e4 100644 --- a/packages/astro/test/alias.test.js +++ b/packages/astro/test/alias.test.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'; diff --git a/packages/astro/test/asset-url-base.test.js b/packages/astro/test/asset-url-base.test.js index 93695e2e7b..18269b6540 100644 --- a/packages/astro/test/asset-url-base.test.js +++ b/packages/astro/test/asset-url-base.test.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'; diff --git a/packages/astro/test/astro-assets-prefix.test.js b/packages/astro/test/astro-assets-prefix.test.js index de5aa84f4f..08af026c15 100644 --- a/packages/astro/test/astro-assets-prefix.test.js +++ b/packages/astro/test/astro-assets-prefix.test.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'; diff --git a/packages/astro/test/astro-assets.test.js b/packages/astro/test/astro-assets.test.js index 266159b707..68e8da2b01 100644 --- a/packages/astro/test/astro-assets.test.js +++ b/packages/astro/test/astro-assets.test.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; diff --git a/packages/astro/test/astro-attrs.test.js b/packages/astro/test/astro-attrs.test.js index a3a8b7e817..0866e4828b 100644 --- a/packages/astro/test/astro-attrs.test.js +++ b/packages/astro/test/astro-attrs.test.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'; diff --git a/packages/astro/test/astro-basic.test.js b/packages/astro/test/astro-basic.test.js index 869abe3de1..cb7c06ce0e 100644 --- a/packages/astro/test/astro-basic.test.js +++ b/packages/astro/test/astro-basic.test.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'; diff --git a/packages/astro/test/astro-children.test.js b/packages/astro/test/astro-children.test.js index 1e2e00d2c7..91afe112e9 100644 --- a/packages/astro/test/astro-children.test.js +++ b/packages/astro/test/astro-children.test.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'; diff --git a/packages/astro/test/astro-class-list.test.js b/packages/astro/test/astro-class-list.test.js index 7d300e997f..9044661239 100644 --- a/packages/astro/test/astro-class-list.test.js +++ b/packages/astro/test/astro-class-list.test.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'; diff --git a/packages/astro/test/astro-client-only.test.js b/packages/astro/test/astro-client-only.test.js index 88b762e73a..33626e2f3e 100644 --- a/packages/astro/test/astro-client-only.test.js +++ b/packages/astro/test/astro-client-only.test.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', () => { diff --git a/packages/astro/test/astro-component-bundling.test.js b/packages/astro/test/astro-component-bundling.test.js index 2d8b75aa55..619f0af045 100644 --- a/packages/astro/test/astro-component-bundling.test.js +++ b/packages/astro/test/astro-component-bundling.test.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'; describe('Component bundling', () => { diff --git a/packages/astro/test/astro-component-code.test.js b/packages/astro/test/astro-component-code.test.js index 1a3a23ea7f..3e5bf5d9e3 100644 --- a/packages/astro/test/astro-component-code.test.js +++ b/packages/astro/test/astro-component-code.test.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('', () => { diff --git a/packages/astro/test/astro-cookies.test.js b/packages/astro/test/astro-cookies.test.js index 34f548109a..9d7136c4f8 100644 --- a/packages/astro/test/astro-cookies.test.js +++ b/packages/astro/test/astro-cookies.test.js @@ -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} */ diff --git a/packages/astro/test/astro-css-bundling.test.js b/packages/astro/test/astro-css-bundling.test.js index 150f9a3819..91f75ec52a 100644 --- a/packages/astro/test/astro-css-bundling.test.js +++ b/packages/astro/test/astro-css-bundling.test.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'; // note: the hashes should be deterministic, but updating the file contents will change hashes diff --git a/packages/astro/test/astro-directives.test.js b/packages/astro/test/astro-directives.test.js index 5b9e0b6724..2a2ae26ef3 100644 --- a/packages/astro/test/astro-directives.test.js +++ b/packages/astro/test/astro-directives.test.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('Directives', async () => { diff --git a/packages/astro/test/astro-doctype.test.js b/packages/astro/test/astro-doctype.test.js index ada762d82a..dbe05092f9 100644 --- a/packages/astro/test/astro-doctype.test.js +++ b/packages/astro/test/astro-doctype.test.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('Doctype', () => { diff --git a/packages/astro/test/astro-dynamic.test.js b/packages/astro/test/astro-dynamic.test.js index 63ed2582ad..47344bf0ea 100644 --- a/packages/astro/test/astro-dynamic.test.js +++ b/packages/astro/test/astro-dynamic.test.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('Dynamic components', () => { diff --git a/packages/astro/test/astro-envs.test.js b/packages/astro/test/astro-envs.test.js index b477b0394c..6af981930f 100644 --- a/packages/astro/test/astro-envs.test.js +++ b/packages/astro/test/astro-envs.test.js @@ -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} */ diff --git a/packages/astro/test/astro-expr.test.js b/packages/astro/test/astro-expr.test.js index 48e73c6c8d..3b47cae818 100644 --- a/packages/astro/test/astro-expr.test.js +++ b/packages/astro/test/astro-expr.test.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('Expressions', () => { diff --git a/packages/astro/test/astro-external-files.test.js b/packages/astro/test/astro-external-files.test.js index 5db44bc21a..ecd92a912d 100644 --- a/packages/astro/test/astro-external-files.test.js +++ b/packages/astro/test/astro-external-files.test.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'; describe('External file references', () => { diff --git a/packages/astro/test/astro-fallback.test.js b/packages/astro/test/astro-fallback.test.js index 2cc36bdbcb..bdd44afa43 100644 --- a/packages/astro/test/astro-fallback.test.js +++ b/packages/astro/test/astro-fallback.test.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('Dynamic component fallback', () => { diff --git a/packages/astro/test/astro-generator.test.js b/packages/astro/test/astro-generator.test.js index 1ede062a73..df1f1ffa5d 100644 --- a/packages/astro/test/astro-generator.test.js +++ b/packages/astro/test/astro-generator.test.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'; diff --git a/packages/astro/test/astro-get-static-paths.test.js b/packages/astro/test/astro-get-static-paths.test.js index 390879c652..36aa051f44 100644 --- a/packages/astro/test/astro-get-static-paths.test.js +++ b/packages/astro/test/astro-get-static-paths.test.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', () => { diff --git a/packages/astro/test/astro-global.test.js b/packages/astro/test/astro-global.test.js index 08e744dd88..119a8413f9 100644 --- a/packages/astro/test/astro-global.test.js +++ b/packages/astro/test/astro-global.test.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('Astro Global', () => { diff --git a/packages/astro/test/astro-head.test.js b/packages/astro/test/astro-head.test.js index 05fb32e572..303d74baaf 100644 --- a/packages/astro/test/astro-head.test.js +++ b/packages/astro/test/astro-head.test.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'; diff --git a/packages/astro/test/astro-markdown-frontmatter-injection.test.js b/packages/astro/test/astro-markdown-frontmatter-injection.test.js index b40b352b8d..850453306f 100644 --- a/packages/astro/test/astro-markdown-frontmatter-injection.test.js +++ b/packages/astro/test/astro-markdown-frontmatter-injection.test.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/'; diff --git a/packages/astro/test/astro-markdown-plugins.test.js b/packages/astro/test/astro-markdown-plugins.test.js index 03863a1ed3..09cb76d2de 100644 --- a/packages/astro/test/astro-markdown-plugins.test.js +++ b/packages/astro/test/astro-markdown-plugins.test.js @@ -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, diff --git a/packages/astro/test/astro-markdown-remarkRehype.test.js b/packages/astro/test/astro-markdown-remarkRehype.test.js index 40f9613e53..4725437ccf 100644 --- a/packages/astro/test/astro-markdown-remarkRehype.test.js +++ b/packages/astro/test/astro-markdown-remarkRehype.test.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'; diff --git a/packages/astro/test/astro-markdown-shiki.test.js b/packages/astro/test/astro-markdown-shiki.test.js index 411a7256ec..982b30e8b5 100644 --- a/packages/astro/test/astro-markdown-shiki.test.js +++ b/packages/astro/test/astro-markdown-shiki.test.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'; diff --git a/packages/astro/test/astro-markdown.test.js b/packages/astro/test/astro-markdown.test.js index 958b1cb4f1..9ae09ff927 100644 --- a/packages/astro/test/astro-markdown.test.js +++ b/packages/astro/test/astro-markdown.test.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/'; diff --git a/packages/astro/test/astro-not-response.test.js b/packages/astro/test/astro-not-response.test.js index e7d23d18d0..467ca27aff 100644 --- a/packages/astro/test/astro-not-response.test.js +++ b/packages/astro/test/astro-not-response.test.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'; // Asset bundling diff --git a/packages/astro/test/astro-object-style.test.js b/packages/astro/test/astro-object-style.test.js index 5c620b8d9d..b6ae7ff08f 100644 --- a/packages/astro/test/astro-object-style.test.js +++ b/packages/astro/test/astro-object-style.test.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('Object style', async () => { diff --git a/packages/astro/test/astro-pageDirectoryUrl.test.js b/packages/astro/test/astro-pageDirectoryUrl.test.js index 040c614ea2..76e224b074 100644 --- a/packages/astro/test/astro-pageDirectoryUrl.test.js +++ b/packages/astro/test/astro-pageDirectoryUrl.test.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'; describe('build format', () => { diff --git a/packages/astro/test/astro-pages.test.js b/packages/astro/test/astro-pages.test.js index 0a1601c397..c3af8d0e4c 100644 --- a/packages/astro/test/astro-pages.test.js +++ b/packages/astro/test/astro-pages.test.js @@ -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; diff --git a/packages/astro/test/astro-pagination-root-spread.test.js b/packages/astro/test/astro-pagination-root-spread.test.js index 9c9ea4e45d..c1f5c0ba5e 100644 --- a/packages/astro/test/astro-pagination-root-spread.test.js +++ b/packages/astro/test/astro-pagination-root-spread.test.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'; diff --git a/packages/astro/test/astro-pagination.test.js b/packages/astro/test/astro-pagination.test.js index 44aaec773f..a78a2f23e1 100644 --- a/packages/astro/test/astro-pagination.test.js +++ b/packages/astro/test/astro-pagination.test.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'; diff --git a/packages/astro/test/astro-partial-html.test.js b/packages/astro/test/astro-partial-html.test.js index 48024b35bc..f6ea0de952 100644 --- a/packages/astro/test/astro-partial-html.test.js +++ b/packages/astro/test/astro-partial-html.test.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 () => { diff --git a/packages/astro/test/astro-public.test.js b/packages/astro/test/astro-public.test.js index 056f626478..1c44d9c842 100644 --- a/packages/astro/test/astro-public.test.js +++ b/packages/astro/test/astro-public.test.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'; describe('Public', () => { diff --git a/packages/astro/test/astro-response.test.js b/packages/astro/test/astro-response.test.js index 3a1bc306f2..87313a76a2 100644 --- a/packages/astro/test/astro-response.test.js +++ b/packages/astro/test/astro-response.test.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'; // Asset bundling diff --git a/packages/astro/test/astro-scripts.test.js b/packages/astro/test/astro-scripts.test.js index a9cdc991b3..ec2d3e805c 100644 --- a/packages/astro/test/astro-scripts.test.js +++ b/packages/astro/test/astro-scripts.test.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('Scripts (hoisted and not)', () => { diff --git a/packages/astro/test/astro-slot-with-client.test.js b/packages/astro/test/astro-slot-with-client.test.js index d0789689d5..a52d9b9079 100644 --- a/packages/astro/test/astro-slot-with-client.test.js +++ b/packages/astro/test/astro-slot-with-client.test.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'; diff --git a/packages/astro/test/astro-slots-nested.test.js b/packages/astro/test/astro-slots-nested.test.js index 7f924d7094..3d04b00e27 100644 --- a/packages/astro/test/astro-slots-nested.test.js +++ b/packages/astro/test/astro-slots-nested.test.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', () => { diff --git a/packages/astro/test/astro-slots.test.js b/packages/astro/test/astro-slots.test.js index 5e916685f5..5653e0421c 100644 --- a/packages/astro/test/astro-slots.test.js +++ b/packages/astro/test/astro-slots.test.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'; diff --git a/packages/astro/test/before-hydration.test.js b/packages/astro/test/before-hydration.test.js index 76d824a750..d14b347bfe 100644 --- a/packages/astro/test/before-hydration.test.js +++ b/packages/astro/test/before-hydration.test.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', () => { diff --git a/packages/astro/test/build-assets.test.js b/packages/astro/test/build-assets.test.js index cba3e5b46a..b33b0a0d1e 100644 --- a/packages/astro/test/build-assets.test.js +++ b/packages/astro/test/build-assets.test.js @@ -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', () => { diff --git a/packages/astro/test/cli.test.js b/packages/astro/test/cli.test.js index 6a88b5b5d9..99a70e6688 100644 --- a/packages/astro/test/cli.test.js +++ b/packages/astro/test/cli.test.js @@ -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) => { diff --git a/packages/astro/test/client-address.test.js b/packages/astro/test/client-address.test.js index de4a6a4f42..667133fe28 100644 --- a/packages/astro/test/client-address.test.js +++ b/packages/astro/test/client-address.test.js @@ -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', () => { diff --git a/packages/astro/test/code-component.test.js b/packages/astro/test/code-component.test.js index a3ed65088e..1024e4ccd4 100644 --- a/packages/astro/test/code-component.test.js +++ b/packages/astro/test/code-component.test.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'; diff --git a/packages/astro/test/component-library.test.js b/packages/astro/test/component-library.test.js index 9533509d63..503599cd0c 100644 --- a/packages/astro/test/component-library.test.js +++ b/packages/astro/test/component-library.test.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'; diff --git a/packages/astro/test/config-mode.test.js b/packages/astro/test/config-mode.test.js index 2b5533f4df..99ad99e1cc 100644 --- a/packages/astro/test/config-mode.test.js +++ b/packages/astro/test/config-mode.test.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'`, () => { diff --git a/packages/astro/test/config-vite-css-target.test.js b/packages/astro/test/config-vite-css-target.test.js index 97cba273fa..1a2137d68d 100644 --- a/packages/astro/test/config-vite-css-target.test.js +++ b/packages/astro/test/config-vite-css-target.test.js @@ -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'; diff --git a/packages/astro/test/config-vite.test.js b/packages/astro/test/config-vite.test.js index 24927e9c74..6f9b20599d 100644 --- a/packages/astro/test/config-vite.test.js +++ b/packages/astro/test/config-vite.test.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'; diff --git a/packages/astro/test/content-collection-references.test.js b/packages/astro/test/content-collection-references.test.js index bf31f5dc46..2305ece316 100644 --- a/packages/astro/test/content-collection-references.test.js +++ b/packages/astro/test/content-collection-references.test.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'; diff --git a/packages/astro/test/content-collections-render.test.js b/packages/astro/test/content-collections-render.test.js index b177fa5426..0e8e37fb17 100644 --- a/packages/astro/test/content-collections-render.test.js +++ b/packages/astro/test/content-collections-render.test.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(); diff --git a/packages/astro/test/content-collections.test.js b/packages/astro/test/content-collections.test.js index 28c153150c..d4aaebaf8f 100644 --- a/packages/astro/test/content-collections.test.js +++ b/packages/astro/test/content-collections.test.js @@ -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', () => { diff --git a/packages/astro/test/core-image-infersize.test.js b/packages/astro/test/core-image-infersize.test.js index 44c571d177..9abf24b1f7 100644 --- a/packages/astro/test/core-image-infersize.test.js +++ b/packages/astro/test/core-image-infersize.test.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'; diff --git a/packages/astro/test/core-image-remark-imgattr.test.js b/packages/astro/test/core-image-remark-imgattr.test.js index 936decfd28..f621239421 100644 --- a/packages/astro/test/core-image-remark-imgattr.test.js +++ b/packages/astro/test/core-image-remark-imgattr.test.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'; diff --git a/packages/astro/test/core-image.test.js b/packages/astro/test/core-image.test.js index 561c7dc2e6..8724df88ba 100644 --- a/packages/astro/test/core-image.test.js +++ b/packages/astro/test/core-image.test.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'; diff --git a/packages/astro/test/css-assets.test.js b/packages/astro/test/css-assets.test.js index 386d8b5751..194094c05a 100644 --- a/packages/astro/test/css-assets.test.js +++ b/packages/astro/test/css-assets.test.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'; diff --git a/packages/astro/test/css-dangling-references.test.js b/packages/astro/test/css-dangling-references.test.js index 58e01d85c7..f4c4070920 100644 --- a/packages/astro/test/css-dangling-references.test.js +++ b/packages/astro/test/css-dangling-references.test.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; diff --git a/packages/astro/test/css-import-as-inline.test.js b/packages/astro/test/css-import-as-inline.test.js index 86bb755561..9941887062 100644 --- a/packages/astro/test/css-import-as-inline.test.js +++ b/packages/astro/test/css-import-as-inline.test.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'; diff --git a/packages/astro/test/css-inline-stylesheets.test.js b/packages/astro/test/css-inline-stylesheets.test.js index 1cce302cc0..d066f530a6 100644 --- a/packages/astro/test/css-inline-stylesheets.test.js +++ b/packages/astro/test/css-inline-stylesheets.test.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; diff --git a/packages/astro/test/css-no-code-split.test.js b/packages/astro/test/css-no-code-split.test.js index ba7680d49d..5d7731bcd1 100644 --- a/packages/astro/test/css-no-code-split.test.js +++ b/packages/astro/test/css-no-code-split.test.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'; diff --git a/packages/astro/test/css-order-import.test.js b/packages/astro/test/css-order-import.test.js index e2ba60e28b..d8ee74a1d0 100644 --- a/packages/astro/test/css-order-import.test.js +++ b/packages/astro/test/css-order-import.test.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'; diff --git a/packages/astro/test/css-order-layout.test.js b/packages/astro/test/css-order-layout.test.js index c1c71fd915..3ce08a7b3f 100644 --- a/packages/astro/test/css-order-layout.test.js +++ b/packages/astro/test/css-order-layout.test.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'; diff --git a/packages/astro/test/css-order.test.js b/packages/astro/test/css-order.test.js index e9476256dd..ee2992a31b 100644 --- a/packages/astro/test/css-order.test.js +++ b/packages/astro/test/css-order.test.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) { diff --git a/packages/astro/test/custom-404-html.test.js b/packages/astro/test/custom-404-html.test.js index 80504f59d5..8e59f40852 100644 --- a/packages/astro/test/custom-404-html.test.js +++ b/packages/astro/test/custom-404-html.test.js @@ -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; diff --git a/packages/astro/test/custom-404-implicit-rerouting.test.js b/packages/astro/test/custom-404-implicit-rerouting.test.js index 35b5afa3ae..4986b34c42 100644 --- a/packages/astro/test/custom-404-implicit-rerouting.test.js +++ b/packages/astro/test/custom-404-implicit-rerouting.test.js @@ -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}`, () => { diff --git a/packages/astro/test/custom-404-injected-from-dep.test.js b/packages/astro/test/custom-404-injected-from-dep.test.js index 13764d5098..beffa27176 100644 --- a/packages/astro/test/custom-404-injected-from-dep.test.js +++ b/packages/astro/test/custom-404-injected-from-dep.test.js @@ -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', () => { diff --git a/packages/astro/test/custom-404-injected.test.js b/packages/astro/test/custom-404-injected.test.js index 48319734a0..2dae399a26 100644 --- a/packages/astro/test/custom-404-injected.test.js +++ b/packages/astro/test/custom-404-injected.test.js @@ -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; diff --git a/packages/astro/test/custom-404-md.test.js b/packages/astro/test/custom-404-md.test.js index 68b5a5ebaa..3cd97482ce 100644 --- a/packages/astro/test/custom-404-md.test.js +++ b/packages/astro/test/custom-404-md.test.js @@ -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; diff --git a/packages/astro/test/custom-404-static.test.js b/packages/astro/test/custom-404-static.test.js index 5ab923dc4a..ba351ae11c 100644 --- a/packages/astro/test/custom-404-static.test.js +++ b/packages/astro/test/custom-404-static.test.js @@ -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; diff --git a/packages/astro/test/custom-assets-name.test.js b/packages/astro/test/custom-assets-name.test.js index 7f101cbf1f..63cd3eb171 100644 --- a/packages/astro/test/custom-assets-name.test.js +++ b/packages/astro/test/custom-assets-name.test.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'; describe('custom the assets name function', () => { diff --git a/packages/astro/test/data-collections.test.js b/packages/astro/test/data-collections.test.js index 1e47b03f95..68f15a7733 100644 --- a/packages/astro/test/data-collections.test.js +++ b/packages/astro/test/data-collections.test.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 authorIds = ['Ben Holmes', 'Fred K Schott', 'Nate Moore']; diff --git a/packages/astro/test/debug-component.test.js b/packages/astro/test/debug-component.test.js index 27cffe1a13..1414505417 100644 --- a/packages/astro/test/debug-component.test.js +++ b/packages/astro/test/debug-component.test.js @@ -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) { diff --git a/packages/astro/test/dev-routing.test.js b/packages/astro/test/dev-routing.test.js index df10e0d42b..cc0a3fa1c0 100644 --- a/packages/astro/test/dev-routing.test.js +++ b/packages/astro/test/dev-routing.test.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('Development Routing', () => { diff --git a/packages/astro/test/dont-delete-root.test.js b/packages/astro/test/dont-delete-root.test.js index 3a81c16bbe..7ae7b5267d 100644 --- a/packages/astro/test/dont-delete-root.test.js +++ b/packages/astro/test/dont-delete-root.test.js @@ -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 () => { diff --git a/packages/astro/test/dynamic-endpoint-collision.test.js b/packages/astro/test/dynamic-endpoint-collision.test.js index d3beaa76ae..b1aa42f9fd 100644 --- a/packages/astro/test/dynamic-endpoint-collision.test.js +++ b/packages/astro/test/dynamic-endpoint-collision.test.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 { load as cheerioLoad } from 'cheerio'; import { loadFixture } from './test-utils.js'; diff --git a/packages/astro/test/dynamic-route-build-file.test.js b/packages/astro/test/dynamic-route-build-file.test.js index c251d43c71..12787dd3a1 100644 --- a/packages/astro/test/dynamic-route-build-file.test.js +++ b/packages/astro/test/dynamic-route-build-file.test.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'; diff --git a/packages/astro/test/entry-file-names.test.js b/packages/astro/test/entry-file-names.test.js index b1fb2e293c..2dc6e5998c 100644 --- a/packages/astro/test/entry-file-names.test.js +++ b/packages/astro/test/entry-file-names.test.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'; diff --git a/packages/astro/test/error-bad-js.test.js b/packages/astro/test/error-bad-js.test.js index 4e015c6d92..b89cf66521 100644 --- a/packages/astro/test/error-bad-js.test.js +++ b/packages/astro/test/error-bad-js.test.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', () => { diff --git a/packages/astro/test/error-non-error.test.js b/packages/astro/test/error-non-error.test.js index 66c386b9c1..c7b7e8ed04 100644 --- a/packages/astro/test/error-non-error.test.js +++ b/packages/astro/test/error-non-error.test.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('Can handle errors that are not instanceof Error', () => { diff --git a/packages/astro/test/experimental-content-collection-references.test.js b/packages/astro/test/experimental-content-collection-references.test.js index 755aaaf054..b53f5f7ee2 100644 --- a/packages/astro/test/experimental-content-collection-references.test.js +++ b/packages/astro/test/experimental-content-collection-references.test.js @@ -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'; diff --git a/packages/astro/test/experimental-content-collections-css-inline-stylesheets.test.js b/packages/astro/test/experimental-content-collections-css-inline-stylesheets.test.js index 8126485c17..6722fc46bc 100644 --- a/packages/astro/test/experimental-content-collections-css-inline-stylesheets.test.js +++ b/packages/astro/test/experimental-content-collections-css-inline-stylesheets.test.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; diff --git a/packages/astro/test/experimental-content-collections-render.test.js b/packages/astro/test/experimental-content-collections-render.test.js index f2ad6dfa95..93ef150fc5 100644 --- a/packages/astro/test/experimental-content-collections-render.test.js +++ b/packages/astro/test/experimental-content-collections-render.test.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, 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()', () => { diff --git a/packages/astro/test/experimental-content-collections.test.js b/packages/astro/test/experimental-content-collections.test.js index 68d0d8012c..6e4b88b236 100644 --- a/packages/astro/test/experimental-content-collections.test.js +++ b/packages/astro/test/experimental-content-collections.test.js @@ -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', () => { diff --git a/packages/astro/test/featuresSupport.test.js b/packages/astro/test/featuresSupport.test.js index b87b0fc94d..4387a702a3 100644 --- a/packages/astro/test/featuresSupport.test.js +++ b/packages/astro/test/featuresSupport.test.js @@ -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; diff --git a/packages/astro/test/fetch.test.js b/packages/astro/test/fetch.test.js index 846e0c8a38..b198f7b1f0 100644 --- a/packages/astro/test/fetch.test.js +++ b/packages/astro/test/fetch.test.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'; diff --git a/packages/astro/test/fontsource.test.js b/packages/astro/test/fontsource.test.js index 41b50bd5e7..51c7a69d6a 100644 --- a/packages/astro/test/fontsource.test.js +++ b/packages/astro/test/fontsource.test.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'; diff --git a/packages/astro/test/get-static-paths-pages.test.js b/packages/astro/test/get-static-paths-pages.test.js index b807310fcc..170e1d485a 100644 --- a/packages/astro/test/get-static-paths-pages.test.js +++ b/packages/astro/test/get-static-paths-pages.test.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'; diff --git a/packages/astro/test/glob-pages-css.test.js b/packages/astro/test/glob-pages-css.test.js index 85813029f5..07b427cb0d 100644 --- a/packages/astro/test/glob-pages-css.test.js +++ b/packages/astro/test/glob-pages-css.test.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'; diff --git a/packages/astro/test/head-injection.test.js b/packages/astro/test/head-injection.test.js index fc27da0e42..eb3ab77363 100644 --- a/packages/astro/test/head-injection.test.js +++ b/packages/astro/test/head-injection.test.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'; diff --git a/packages/astro/test/hoisted-imports.test.js b/packages/astro/test/hoisted-imports.test.js index b30351378f..f7b8a39282 100644 --- a/packages/astro/test/hoisted-imports.test.js +++ b/packages/astro/test/hoisted-imports.test.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 * as cheerio from 'cheerio'; +import { loadFixture } from './test-utils.js'; describe('Hoisted Imports', () => { let fixture; diff --git a/packages/astro/test/html-component.test.js b/packages/astro/test/html-component.test.js index c0d67d4315..535c01ce3e 100644 --- a/packages/astro/test/html-component.test.js +++ b/packages/astro/test/html-component.test.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'; diff --git a/packages/astro/test/html-escape-complex.test.js b/packages/astro/test/html-escape-complex.test.js index f4f4e15907..fa6cb1f77f 100644 --- a/packages/astro/test/html-escape-complex.test.js +++ b/packages/astro/test/html-escape-complex.test.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'; diff --git a/packages/astro/test/html-escape.test.js b/packages/astro/test/html-escape.test.js index 61b03ca6f0..60033f2df7 100644 --- a/packages/astro/test/html-escape.test.js +++ b/packages/astro/test/html-escape.test.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'; diff --git a/packages/astro/test/html-page.test.js b/packages/astro/test/html-page.test.js index e0533688d0..1f94aed401 100644 --- a/packages/astro/test/html-page.test.js +++ b/packages/astro/test/html-page.test.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'; diff --git a/packages/astro/test/html-slots.test.js b/packages/astro/test/html-slots.test.js index 61e11e37af..b49f270652 100644 --- a/packages/astro/test/html-slots.test.js +++ b/packages/astro/test/html-slots.test.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'; diff --git a/packages/astro/test/hydration-race.test.js b/packages/astro/test/hydration-race.test.js index 66e791bca9..ac2af37232 100644 --- a/packages/astro/test/hydration-race.test.js +++ b/packages/astro/test/hydration-race.test.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'; diff --git a/packages/astro/test/i18n-routing.test.js b/packages/astro/test/i18n-routing.test.js index 3c9a19df6f..7287fc041c 100644 --- a/packages/astro/test/i18n-routing.test.js +++ b/packages/astro/test/i18n-routing.test.js @@ -1,8 +1,8 @@ +import * as assert from 'node:assert/strict'; +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'; -import { describe, it, before, after } from 'node:test'; -import * as assert from 'node:assert/strict'; describe('astro:i18n virtual module', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/astro/test/image-deletion.test.js b/packages/astro/test/image-deletion.test.js index d773a45b2e..4283e8c06f 100644 --- a/packages/astro/test/image-deletion.test.js +++ b/packages/astro/test/image-deletion.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { describe, it, before } from 'node:test'; +import { before, describe, it } from 'node:test'; import { testImageService } from './test-image-service.js'; import { loadFixture } from './test-utils.js'; diff --git a/packages/astro/test/import-ts-with-js.test.js b/packages/astro/test/import-ts-with-js.test.js index 2b72a61e07..5a15c68132 100644 --- a/packages/astro/test/import-ts-with-js.test.js +++ b/packages/astro/test/import-ts-with-js.test.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'; diff --git a/packages/astro/test/impostor-mdx-file.test.js b/packages/astro/test/impostor-mdx-file.test.js index bb4dbf5f84..98ef3ceac8 100644 --- a/packages/astro/test/impostor-mdx-file.test.js +++ b/packages/astro/test/impostor-mdx-file.test.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 { isWindows, loadFixture } from './test-utils.js'; let fixture; diff --git a/packages/astro/test/integration-add-page-extension.test.js b/packages/astro/test/integration-add-page-extension.test.js index f1e97d00ef..daf87fb807 100644 --- a/packages/astro/test/integration-add-page-extension.test.js +++ b/packages/astro/test/integration-add-page-extension.test.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'; diff --git a/packages/astro/test/integration-server-setup.test.js b/packages/astro/test/integration-server-setup.test.js index 45f14d708f..fd6c2329a6 100644 --- a/packages/astro/test/integration-server-setup.test.js +++ b/packages/astro/test/integration-server-setup.test.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 { loadFixture } from './test-utils.js'; describe('Integration server setup', () => { diff --git a/packages/astro/test/jsx.test.js b/packages/astro/test/jsx.test.js index 3b972a6eb0..c8da3de72b 100644 --- a/packages/astro/test/jsx.test.js +++ b/packages/astro/test/jsx.test.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'; diff --git a/packages/astro/test/lazy-layout.test.js b/packages/astro/test/lazy-layout.test.js index 4be339bafb..a9f31756e4 100644 --- a/packages/astro/test/lazy-layout.test.js +++ b/packages/astro/test/lazy-layout.test.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'; diff --git a/packages/astro/test/lit-element.test.js b/packages/astro/test/lit-element.test.js index 2ea5f13a94..efe16b943f 100644 --- a/packages/astro/test/lit-element.test.js +++ b/packages/astro/test/lit-element.test.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'; diff --git a/packages/astro/test/markdown.test.js b/packages/astro/test/markdown.test.js index 1e78409ce8..654f9631d5 100644 --- a/packages/astro/test/markdown.test.js +++ b/packages/astro/test/markdown.test.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'; diff --git a/packages/astro/test/middleware.test.js b/packages/astro/test/middleware.test.js index b5d77c091b..a2c73284d0 100644 --- a/packages/astro/test/middleware.test.js +++ b/packages/astro/test/middleware.test.js @@ -1,8 +1,8 @@ import assert from 'node:assert/strict'; -import { describe, it, before, after } from 'node:test'; -import * as cheerio from 'cheerio'; import { existsSync, readFileSync } from 'node:fs'; +import { after, before, describe, it } from 'node:test'; import { fileURLToPath } from 'node:url'; +import * as cheerio from 'cheerio'; import testAdapter from './test-adapter.js'; import { loadFixture } from './test-utils.js'; diff --git a/packages/astro/test/minification-html.test.js b/packages/astro/test/minification-html.test.js index 6aefa98a52..fd890601d3 100644 --- a/packages/astro/test/minification-html.test.js +++ b/packages/astro/test/minification-html.test.js @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; -import { describe, it, before, after } from 'node:test'; -import { loadFixture } from './test-utils.js'; +import { after, before, describe, it } from 'node:test'; import testAdapter from './test-adapter.js'; +import { loadFixture } from './test-utils.js'; const NEW_LINES = /[\r\n]+/g; diff --git a/packages/astro/test/multiple-renderers.test.js b/packages/astro/test/multiple-renderers.test.js index ba55ac8470..06f13284a1 100644 --- a/packages/astro/test/multiple-renderers.test.js +++ b/packages/astro/test/multiple-renderers.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { describe, it, before } from 'node:test'; +import { before, describe, it } from 'node:test'; import * as cheerio from 'cheerio'; import { loadFixture } from './test-utils.js'; diff --git a/packages/astro/test/non-ascii-path.test.js b/packages/astro/test/non-ascii-path.test.js index ada3749a85..e3e532be87 100644 --- a/packages/astro/test/non-ascii-path.test.js +++ b/packages/astro/test/non-ascii-path.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { describe, it, before } from 'node:test'; +import { before, describe, it } from 'node:test'; import * as cheerio from 'cheerio'; import { loadFixture } from './test-utils.js'; diff --git a/packages/astro/test/non-html-pages.test.js b/packages/astro/test/non-html-pages.test.js index f27787ef96..2b8ed970f2 100644 --- a/packages/astro/test/non-html-pages.test.js +++ b/packages/astro/test/non-html-pages.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { describe, it, before } from 'node:test'; +import { before, describe, it } from 'node:test'; import { loadFixture } from './test-utils.js'; describe('Non-HTML Pages', () => { diff --git a/packages/astro/test/partials.test.js b/packages/astro/test/partials.test.js index 84880781ec..a783093751 100644 --- a/packages/astro/test/partials.test.js +++ b/packages/astro/test/partials.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { before, describe, it, after } from 'node:test'; +import { after, before, describe, it } from 'node:test'; import { loadFixture } from './test-utils.js'; describe('Partials', () => { diff --git a/packages/astro/test/preact-compat-component.test.js b/packages/astro/test/preact-compat-component.test.js index d9dc9fb717..c0a639dfbc 100644 --- a/packages/astro/test/preact-compat-component.test.js +++ b/packages/astro/test/preact-compat-component.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { before, describe, it, after } from 'node:test'; +import { after, before, describe, it } from 'node:test'; import * as cheerio from 'cheerio'; import { loadFixture } from './test-utils.js'; diff --git a/packages/astro/test/preview-routing.test.js b/packages/astro/test/preview-routing.test.js index fe4a0d111f..eed735c768 100644 --- a/packages/astro/test/preview-routing.test.js +++ b/packages/astro/test/preview-routing.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { before, describe, it, after } from 'node:test'; +import { after, before, describe, it } from 'node:test'; import * as cheerio from 'cheerio'; import { loadFixture } from './test-utils.js'; diff --git a/packages/astro/test/public-base-404.test.js b/packages/astro/test/public-base-404.test.js index 682f38b695..12c5ce14c6 100644 --- a/packages/astro/test/public-base-404.test.js +++ b/packages/astro/test/public-base-404.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { before, describe, it, after } from 'node:test'; +import { after, before, describe, it } from 'node:test'; import * as cheerio from 'cheerio'; import { loadFixture } from './test-utils.js'; diff --git a/packages/astro/test/redirects.test.js b/packages/astro/test/redirects.test.js index b3b0b0a559..443b820734 100644 --- a/packages/astro/test/redirects.test.js +++ b/packages/astro/test/redirects.test.js @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; -import { before, describe, it, after } from 'node:test'; -import { loadFixture } from './test-utils.js'; +import { after, before, describe, it } from 'node:test'; import testAdapter from './test-adapter.js'; +import { loadFixture } from './test-utils.js'; describe('Astro.redirect', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/astro/test/routing-priority.test.js b/packages/astro/test/routing-priority.test.js index b87c353dba..d4203595d8 100644 --- a/packages/astro/test/routing-priority.test.js +++ b/packages/astro/test/routing-priority.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { before, describe, 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'; diff --git a/packages/astro/test/scoped-style-strategy.test.js b/packages/astro/test/scoped-style-strategy.test.js index 4d149dd9e2..c1a76aabbf 100644 --- a/packages/astro/test/scoped-style-strategy.test.js +++ b/packages/astro/test/scoped-style-strategy.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { describe, it, before } from 'node:test'; +import { before, describe, it } from 'node:test'; import * as cheerio from 'cheerio'; import { loadFixture } from './test-utils.js'; diff --git a/packages/astro/test/set-html.test.js b/packages/astro/test/set-html.test.js index 1fe81fe51b..c3a100d044 100644 --- a/packages/astro/test/set-html.test.js +++ b/packages/astro/test/set-html.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { before, describe, it, after } from 'node:test'; +import { after, before, describe, it } from 'node:test'; import * as cheerio from 'cheerio'; import { loadFixture } from './test-utils.js'; diff --git a/packages/astro/test/solid-component.test.js b/packages/astro/test/solid-component.test.js index 870b0c1b64..7043983d7a 100644 --- a/packages/astro/test/solid-component.test.js +++ b/packages/astro/test/solid-component.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { before, describe, 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'; diff --git a/packages/astro/test/space-in-folder-name.test.js b/packages/astro/test/space-in-folder-name.test.js index f029c861db..08995d84ee 100644 --- a/packages/astro/test/space-in-folder-name.test.js +++ b/packages/astro/test/space-in-folder-name.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { before, describe, it, after } from 'node:test'; +import { after, before, describe, it } from 'node:test'; import * as cheerio from 'cheerio'; import { loadFixture } from './test-utils.js'; diff --git a/packages/astro/test/special-chars-in-component-imports.test.js b/packages/astro/test/special-chars-in-component-imports.test.js index 40101132cd..64301741ad 100644 --- a/packages/astro/test/special-chars-in-component-imports.test.js +++ b/packages/astro/test/special-chars-in-component-imports.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { before, describe, it, after } from 'node:test'; +import { after, before, describe, it } from 'node:test'; import { load as cheerioLoad } from 'cheerio'; import { isWindows, loadFixture } from './test-utils.js'; diff --git a/packages/astro/test/ssr-adapter-build-config.test.js b/packages/astro/test/ssr-adapter-build-config.test.js index d1566f097d..8c19c56ba6 100644 --- a/packages/astro/test/ssr-adapter-build-config.test.js +++ b/packages/astro/test/ssr-adapter-build-config.test.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 { viteID } from '../dist/core/util.js'; +import { loadFixture } from './test-utils.js'; describe('Integration buildConfig hook', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/astro/test/ssr-api-route.test.js b/packages/astro/test/ssr-api-route.test.js index d5fefb17a0..495381eac6 100644 --- a/packages/astro/test/ssr-api-route.test.js +++ b/packages/astro/test/ssr-api-route.test.js @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { after, describe, before, it } from 'node:test'; import net from 'node:net'; +import { after, before, describe, it } from 'node:test'; import testAdapter from './test-adapter.js'; import { loadFixture } from './test-utils.js'; diff --git a/packages/astro/test/ssr-assets.test.js b/packages/astro/test/ssr-assets.test.js index 9d900babe4..d56ad1686b 100644 --- a/packages/astro/test/ssr-assets.test.js +++ b/packages/astro/test/ssr-assets.test.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('SSR Assets', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/astro/test/ssr-dynamic.test.js b/packages/astro/test/ssr-dynamic.test.js index 36cf0acedd..60b61335da 100644 --- a/packages/astro/test/ssr-dynamic.test.js +++ b/packages/astro/test/ssr-dynamic.test.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 { load as cheerioLoad } from 'cheerio'; -import { loadFixture } from './test-utils.js'; import testAdapter from './test-adapter.js'; +import { loadFixture } from './test-utils.js'; describe('Dynamic pages in SSR', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/astro/test/ssr-env.test.js b/packages/astro/test/ssr-env.test.js index 619495f3f0..7da1907367 100644 --- a/packages/astro/test/ssr-env.test.js +++ b/packages/astro/test/ssr-env.test.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 testAdapter from './test-adapter.js'; +import { loadFixture } from './test-utils.js'; describe('SSR Environment Variables', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/astro/test/ssr-error-pages.test.js b/packages/astro/test/ssr-error-pages.test.js index 1ea7a52943..f62c507b53 100644 --- a/packages/astro/test/ssr-error-pages.test.js +++ b/packages/astro/test/ssr-error-pages.test.js @@ -1,8 +1,8 @@ import assert from 'node:assert/strict'; -import { before, describe, 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('404 and 500 pages', () => { /** @type {import('./test-utils.js').Fixture} */ diff --git a/packages/astro/test/ssr-hoisted-script.test.js b/packages/astro/test/ssr-hoisted-script.test.js index 271b19b940..6bd4642bb4 100644 --- a/packages/astro/test/ssr-hoisted-script.test.js +++ b/packages/astro/test/ssr-hoisted-script.test.js @@ -1,8 +1,8 @@ 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'; import testAdapter from './test-adapter.js'; +import { loadFixture } from './test-utils.js'; async function fetchHTML(fixture, path) { const app = await fixture.loadTestAdapterApp(); diff --git a/packages/astro/test/ssr-large-array.test.js b/packages/astro/test/ssr-large-array.test.js index c004660e9c..f860244670 100644 --- a/packages/astro/test/ssr-large-array.test.js +++ b/packages/astro/test/ssr-large-array.test.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 testAdapter from './test-adapter.js'; +import { loadFixture } from './test-utils.js'; describe('SSR with Large Array and client rendering', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/astro/test/ssr-lit.test.js b/packages/astro/test/ssr-lit.test.js index edcc0b9b07..40057cf218 100644 --- a/packages/astro/test/ssr-lit.test.js +++ b/packages/astro/test/ssr-lit.test.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 { load as cheerioLoad } from 'cheerio'; -import { loadFixture } from './test-utils.js'; import testAdapter from './test-adapter.js'; +import { loadFixture } from './test-utils.js'; describe('Lit integration in SSR', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/astro/test/ssr-locals.test.js b/packages/astro/test/ssr-locals.test.js index 2f0fa8d356..9fea1fed9b 100644 --- a/packages/astro/test/ssr-locals.test.js +++ b/packages/astro/test/ssr-locals.test.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 testAdapter from './test-adapter.js'; +import { loadFixture } from './test-utils.js'; describe('SSR Astro.locals from server', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/astro/test/ssr-manifest.test.js b/packages/astro/test/ssr-manifest.test.js index 0a499b6b58..eaab834689 100644 --- a/packages/astro/test/ssr-manifest.test.js +++ b/packages/astro/test/ssr-manifest.test.js @@ -1,8 +1,8 @@ import assert from 'node:assert/strict'; -import { describe, before, it } from 'node:test'; -import { loadFixture } from './test-utils.js'; -import testAdapter from './test-adapter.js'; +import { 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:ssr-manifest', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/astro/test/ssr-markdown.test.js b/packages/astro/test/ssr-markdown.test.js index 2d80ac7b72..2868917903 100644 --- a/packages/astro/test/ssr-markdown.test.js +++ b/packages/astro/test/ssr-markdown.test.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 { load as cheerioLoad } from 'cheerio'; -import { loadFixture } from './test-utils.js'; import testAdapter from './test-adapter.js'; +import { loadFixture } from './test-utils.js'; describe('Markdown pages in SSR', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/astro/test/ssr-params.test.js b/packages/astro/test/ssr-params.test.js index df050f9e76..c5d376fbfc 100644 --- a/packages/astro/test/ssr-params.test.js +++ b/packages/astro/test/ssr-params.test.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 testAdapter from './test-adapter.js'; +import { loadFixture } from './test-utils.js'; describe('Astro.params in SSR', () => { /** @type {import('./test-utils.js').Fixture} */ diff --git a/packages/astro/test/ssr-partytown.test.js b/packages/astro/test/ssr-partytown.test.js index 04e7abc237..4910f3e51b 100644 --- a/packages/astro/test/ssr-partytown.test.js +++ b/packages/astro/test/ssr-partytown.test.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 { load as cheerioLoad } from 'cheerio'; -import { loadFixture } from './test-utils.js'; import testAdapter from './test-adapter.js'; +import { loadFixture } from './test-utils.js'; describe('Using the Partytown integration in SSR', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/astro/test/ssr-prerender-get-static-paths.test.js b/packages/astro/test/ssr-prerender-get-static-paths.test.js index 9a76c62a53..999ab5a747 100644 --- a/packages/astro/test/ssr-prerender-get-static-paths.test.js +++ b/packages/astro/test/ssr-prerender-get-static-paths.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { after, afterEach, describe, before, it } from 'node:test'; +import { after, afterEach, before, describe, it } from 'node:test'; import * as cheerio from 'cheerio'; import testAdapter from './test-adapter.js'; import { loadFixture } from './test-utils.js'; diff --git a/packages/astro/test/ssr-prerender.test.js b/packages/astro/test/ssr-prerender.test.js index 98678d681d..2bf53cefaf 100644 --- a/packages/astro/test/ssr-prerender.test.js +++ b/packages/astro/test/ssr-prerender.test.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 testAdapter from './test-adapter.js'; +import { loadFixture } from './test-utils.js'; describe('SSR: prerender', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/astro/test/ssr-preview.test.js b/packages/astro/test/ssr-preview.test.js index c9c1804486..50cefa69c7 100644 --- a/packages/astro/test/ssr-preview.test.js +++ b/packages/astro/test/ssr-preview.test.js @@ -1,6 +1,6 @@ -import { loadFixture } from './test-utils.js'; -import testAdapter from './test-adapter.js'; import { before, describe, it } from 'node:test'; +import testAdapter from './test-adapter.js'; +import { loadFixture } from './test-utils.js'; describe('SSR Preview', () => { /** @type {import('./test-utils').Fixture} */ let fixture; diff --git a/packages/astro/test/ssr-request.test.js b/packages/astro/test/ssr-request.test.js index 4569fe291f..a78a10f25e 100644 --- a/packages/astro/test/ssr-request.test.js +++ b/packages/astro/test/ssr-request.test.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 { load as cheerioLoad } from 'cheerio'; -import { loadFixture } from './test-utils.js'; import testAdapter from './test-adapter.js'; +import { loadFixture } from './test-utils.js'; describe('Using Astro.request in SSR', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/astro/test/ssr-response.test.js b/packages/astro/test/ssr-response.test.js index 703ee76967..c3ddb2744f 100644 --- a/packages/astro/test/ssr-response.test.js +++ b/packages/astro/test/ssr-response.test.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('Using Astro.response in SSR', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/astro/test/ssr-scripts.test.js b/packages/astro/test/ssr-scripts.test.js index f1a213ea6f..5afa2a25bc 100644 --- a/packages/astro/test/ssr-scripts.test.js +++ b/packages/astro/test/ssr-scripts.test.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('SSR Hydrated component scripts', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/astro/test/ssr-split-manifest.test.js b/packages/astro/test/ssr-split-manifest.test.js index 04cb1219ac..2f66b36761 100644 --- a/packages/astro/test/ssr-split-manifest.test.js +++ b/packages/astro/test/ssr-split-manifest.test.js @@ -1,11 +1,11 @@ import assert from 'node:assert/strict'; -import { describe, before, it } from 'node:test'; -import { loadFixture } from './test-utils.js'; -import testAdapter from './test-adapter.js'; -import * as cheerio from 'cheerio'; -import { fileURLToPath } from 'node:url'; import { existsSync, readFileSync } from 'node:fs'; import { resolve } from 'node:path'; +import { before, describe, it } from 'node:test'; +import { fileURLToPath } from 'node:url'; +import * as cheerio from 'cheerio'; +import testAdapter from './test-adapter.js'; +import { loadFixture } from './test-utils.js'; describe('astro:ssr-manifest, split', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/astro/test/static-build-code-component.test.js b/packages/astro/test/static-build-code-component.test.js index 4bd4ca1a42..d23d4115b2 100644 --- a/packages/astro/test/static-build-code-component.test.js +++ b/packages/astro/test/static-build-code-component.test.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('Code component inside static build', () => { diff --git a/packages/astro/test/static-build-frameworks.test.js b/packages/astro/test/static-build-frameworks.test.js index 63df5c3797..8eb35bf7e1 100644 --- a/packages/astro/test/static-build-frameworks.test.js +++ b/packages/astro/test/static-build-frameworks.test.js @@ -1,7 +1,7 @@ -import * as cheerio from 'cheerio'; import assert from 'node:assert/strict'; import { 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('Static build - frameworks', () => { if (isWindows) { diff --git a/packages/astro/test/static-build.test.js b/packages/astro/test/static-build.test.js index 3d7a92dfa3..126e101160 100644 --- a/packages/astro/test/static-build.test.js +++ b/packages/astro/test/static-build.test.js @@ -1,8 +1,8 @@ -import { load as cheerioLoad } from 'cheerio'; import assert from 'node:assert/strict'; import { before, describe, it } from 'node:test'; -import { loadFixture } from './test-utils.js'; +import { load as cheerioLoad } from 'cheerio'; import { Logger } from '../dist/core/logger/core.js'; +import { loadFixture } from './test-utils.js'; function addLeadingSlash(path) { return path.startsWith('/') ? path : '/' + path; diff --git a/packages/astro/test/streaming.test.js b/packages/astro/test/streaming.test.js index 074fde269e..1cfe7f42f1 100644 --- a/packages/astro/test/streaming.test.js +++ b/packages/astro/test/streaming.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { before, describe, it, after } from 'node:test'; +import { after, before, describe, it } from 'node:test'; import * as cheerio from 'cheerio'; import testAdapter from './test-adapter.js'; import { isWindows, loadFixture, streamAsyncIterator } from './test-utils.js'; diff --git a/packages/astro/test/svelte-component.test.js b/packages/astro/test/svelte-component.test.js index b27c1fbf7c..16ccd0e0bc 100644 --- a/packages/astro/test/svelte-component.test.js +++ b/packages/astro/test/svelte-component.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { before, describe, 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'; diff --git a/packages/astro/test/third-party-astro.test.js b/packages/astro/test/third-party-astro.test.js index 1a81af8a92..7a6c91adec 100644 --- a/packages/astro/test/third-party-astro.test.js +++ b/packages/astro/test/third-party-astro.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { before, describe, it, after } from 'node:test'; +import { after, before, describe, it } from 'node:test'; import * as cheerio from 'cheerio'; import { loadFixture } from './test-utils.js'; diff --git a/packages/astro/test/units/app/headers.test.js b/packages/astro/test/units/app/headers.test.js index e8ae33f53a..b13b760f4e 100644 --- a/packages/astro/test/units/app/headers.test.js +++ b/packages/astro/test/units/app/headers.test.js @@ -1,5 +1,5 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; import { createOutgoingHttpHeaders } from '../../../dist/core/app/createOutgoingHttpHeaders.js'; describe('createOutgoingHttpHeaders', () => { diff --git a/packages/astro/test/units/assets/remote-pattern.test.js b/packages/astro/test/units/assets/remote-pattern.test.js index 316b818600..8b2072a4c1 100644 --- a/packages/astro/test/units/assets/remote-pattern.test.js +++ b/packages/astro/test/units/assets/remote-pattern.test.js @@ -1,11 +1,11 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; import { - matchProtocol, - matchPort, matchHostname, matchPathname, matchPattern, + matchPort, + matchProtocol, } from '../../../dist/assets/utils/remotePattern.js'; describe('astro/src/assets/utils/remotePattern', () => { diff --git a/packages/astro/test/units/build/static-build.test.js b/packages/astro/test/units/build/static-build.test.js index acc3395df3..487ebf10c6 100644 --- a/packages/astro/test/units/build/static-build.test.js +++ b/packages/astro/test/units/build/static-build.test.js @@ -1,5 +1,5 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; import { makeAstroPageEntryPointFileName } from '../../../dist/core/build/static-build.js'; describe('astro/src/core/build', () => { diff --git a/packages/astro/test/units/compile/invalid-css.test.js b/packages/astro/test/units/compile/invalid-css.test.js index b43fb8ff65..73d52e5ec8 100644 --- a/packages/astro/test/units/compile/invalid-css.test.js +++ b/packages/astro/test/units/compile/invalid-css.test.js @@ -1,9 +1,9 @@ -import { resolveConfig } from 'vite'; -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; +import { pathToFileURL } from 'node:url'; +import { resolveConfig } from 'vite'; import { compile } from '../../../dist/core/compile/index.js'; import { AggregateError } from '../../../dist/core/errors/index.js'; -import { pathToFileURL } from 'node:url'; describe('astro/src/core/compile', () => { describe('Invalid CSS', () => { diff --git a/packages/astro/test/units/config/config-resolve.test.js b/packages/astro/test/units/config/config-resolve.test.js index 78b556200a..b0c11be065 100644 --- a/packages/astro/test/units/config/config-resolve.test.js +++ b/packages/astro/test/units/config/config-resolve.test.js @@ -1,8 +1,8 @@ +import * as assert from 'node:assert/strict'; import path from 'node:path'; +import { describe, it } from 'node:test'; import { fileURLToPath } from 'node:url'; import { resolveConfig } from '../../../dist/core/config/index.js'; -import { describe, it } from 'node:test'; -import * as assert from 'node:assert/strict'; describe('resolveConfig', () => { it('resolves relative inline root correctly', async () => { diff --git a/packages/astro/test/units/config/config-server.test.js b/packages/astro/test/units/config/config-server.test.js index 816cc70355..4d7063498a 100644 --- a/packages/astro/test/units/config/config-server.test.js +++ b/packages/astro/test/units/config/config-server.test.js @@ -1,8 +1,8 @@ +import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; import { fileURLToPath } from 'node:url'; import { flagsToAstroInlineConfig } from '../../../dist/cli/flags.js'; import { resolveConfig } from '../../../dist/core/config/index.js'; -import { describe, it } from 'node:test'; -import * as assert from 'node:assert/strict'; const cwd = fileURLToPath(new URL('../../fixtures/config-host/', import.meta.url)); diff --git a/packages/astro/test/units/config/config-tsconfig.test.js b/packages/astro/test/units/config/config-tsconfig.test.js index 0cd579257e..c6372cbe07 100644 --- a/packages/astro/test/units/config/config-tsconfig.test.js +++ b/packages/astro/test/units/config/config-tsconfig.test.js @@ -1,6 +1,6 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; import * as path from 'node:path'; +import { describe, it } from 'node:test'; import { fileURLToPath } from 'node:url'; import { loadTSConfig, updateTSConfigForFramework } from '../../../dist/core/config/index.js'; diff --git a/packages/astro/test/units/config/config-validate.test.js b/packages/astro/test/units/config/config-validate.test.js index 10a5c3482c..7bd54755a2 100644 --- a/packages/astro/test/units/config/config-validate.test.js +++ b/packages/astro/test/units/config/config-validate.test.js @@ -1,9 +1,9 @@ -import { z } from 'zod'; -import stripAnsi from 'strip-ansi'; -import { formatConfigErrorMessage } from '../../../dist/core/messages.js'; -import { validateConfig } from '../../../dist/core/config/config.js'; -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; +import stripAnsi from 'strip-ansi'; +import { z } from 'zod'; +import { validateConfig } from '../../../dist/core/config/config.js'; +import { formatConfigErrorMessage } from '../../../dist/core/messages.js'; describe('Config Validation', () => { it('empty user config is valid', async () => { diff --git a/packages/astro/test/units/config/format.test.js b/packages/astro/test/units/config/format.test.js index fa65d502c1..4c9e472ff3 100644 --- a/packages/astro/test/units/config/format.test.js +++ b/packages/astro/test/units/config/format.test.js @@ -1,6 +1,6 @@ -import { fileURLToPath } from 'node:url'; -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; +import { fileURLToPath } from 'node:url'; import { createFs, runInContainer } from '../test-utils.js'; const root = new URL('../../fixtures/tailwindcss-ts/', import.meta.url); diff --git a/packages/astro/test/units/content-collections/error-map.test.js b/packages/astro/test/units/content-collections/error-map.test.js index 5e3f587331..0595fd58a2 100644 --- a/packages/astro/test/units/content-collections/error-map.test.js +++ b/packages/astro/test/units/content-collections/error-map.test.js @@ -1,8 +1,8 @@ -import { z } from '../../../zod.mjs'; -import { errorMap } from '../../../dist/content/index.js'; -import { fixLineEndings } from '../../test-utils.js'; -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; +import { errorMap } from '../../../dist/content/index.js'; +import { z } from '../../../zod.mjs'; +import { fixLineEndings } from '../../test-utils.js'; describe('Content Collections - error map', () => { it('Prefixes messages with object key', () => { diff --git a/packages/astro/test/units/content-collections/frontmatter.test.js b/packages/astro/test/units/content-collections/frontmatter.test.js index 2e161b81ff..260d561e4d 100644 --- a/packages/astro/test/units/content-collections/frontmatter.test.js +++ b/packages/astro/test/units/content-collections/frontmatter.test.js @@ -1,7 +1,7 @@ -import { fileURLToPath } from 'node:url'; import nodeFS from 'node:fs'; import path from 'node:path'; import { describe, it } from 'node:test'; +import { fileURLToPath } from 'node:url'; import { attachContentServerListeners } from '../../../dist/content/index.js'; import { createFs, runInContainer, triggerFSEvent } from '../test-utils.js'; diff --git a/packages/astro/test/units/content-collections/get-entry-info.test.js b/packages/astro/test/units/content-collections/get-entry-info.test.js index 780dc9467a..769f3c0dc2 100644 --- a/packages/astro/test/units/content-collections/get-entry-info.test.js +++ b/packages/astro/test/units/content-collections/get-entry-info.test.js @@ -1,6 +1,6 @@ -import { getContentEntryIdAndSlug, getEntryCollectionName } from '../../../dist/content/utils.js'; -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; +import { getContentEntryIdAndSlug, getEntryCollectionName } from '../../../dist/content/utils.js'; describe('Content Collections - entry info', () => { const contentDir = new URL('src/content/', import.meta.url); diff --git a/packages/astro/test/units/content-collections/get-entry-type.test.js b/packages/astro/test/units/content-collections/get-entry-type.test.js index 96665d5e3c..2876e5bfc3 100644 --- a/packages/astro/test/units/content-collections/get-entry-type.test.js +++ b/packages/astro/test/units/content-collections/get-entry-type.test.js @@ -1,5 +1,5 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; import { fileURLToPath } from 'node:url'; import { getEntryType } from '../../../dist/content/utils.js'; diff --git a/packages/astro/test/units/cookies/delete.test.js b/packages/astro/test/units/cookies/delete.test.js index e9e1bcd3c4..4b5f188e1a 100644 --- a/packages/astro/test/units/cookies/delete.test.js +++ b/packages/astro/test/units/cookies/delete.test.js @@ -1,5 +1,5 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; import { AstroCookies } from '../../../dist/core/cookies/index.js'; import { apply as applyPolyfill } from '../../../dist/core/polyfill.js'; diff --git a/packages/astro/test/units/cookies/error.test.js b/packages/astro/test/units/cookies/error.test.js index cf53827166..027474424a 100644 --- a/packages/astro/test/units/cookies/error.test.js +++ b/packages/astro/test/units/cookies/error.test.js @@ -1,5 +1,5 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; import { AstroCookies } from '../../../dist/core/cookies/index.js'; import { apply as applyPolyfill } from '../../../dist/core/polyfill.js'; diff --git a/packages/astro/test/units/cookies/get.test.js b/packages/astro/test/units/cookies/get.test.js index d3d86260a6..8cf9b6e20f 100644 --- a/packages/astro/test/units/cookies/get.test.js +++ b/packages/astro/test/units/cookies/get.test.js @@ -1,5 +1,5 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; import { AstroCookies } from '../../../dist/core/cookies/index.js'; import { apply as applyPolyfill } from '../../../dist/core/polyfill.js'; diff --git a/packages/astro/test/units/cookies/has.test.js b/packages/astro/test/units/cookies/has.test.js index 23346f9179..351893d1e0 100644 --- a/packages/astro/test/units/cookies/has.test.js +++ b/packages/astro/test/units/cookies/has.test.js @@ -1,5 +1,5 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; import { AstroCookies } from '../../../dist/core/cookies/index.js'; import { apply as applyPolyfill } from '../../../dist/core/polyfill.js'; diff --git a/packages/astro/test/units/cookies/set.test.js b/packages/astro/test/units/cookies/set.test.js index f7fd334d98..120ff92bf6 100644 --- a/packages/astro/test/units/cookies/set.test.js +++ b/packages/astro/test/units/cookies/set.test.js @@ -1,5 +1,5 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; import { AstroCookies } from '../../../dist/core/cookies/index.js'; import { apply as applyPolyfill } from '../../../dist/core/polyfill.js'; diff --git a/packages/astro/test/units/dev/base.test.js b/packages/astro/test/units/dev/base.test.js index a3006163b2..6a8f33fb7e 100644 --- a/packages/astro/test/units/dev/base.test.js +++ b/packages/astro/test/units/dev/base.test.js @@ -1,5 +1,5 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; import { fileURLToPath } from 'node:url'; import { createFs, createRequestAndResponse, runInContainer } from '../test-utils.js'; diff --git a/packages/astro/test/units/dev/collections-mixed-content-errors.test.js b/packages/astro/test/units/dev/collections-mixed-content-errors.test.js index 26ea1334d0..0086b51e83 100644 --- a/packages/astro/test/units/dev/collections-mixed-content-errors.test.js +++ b/packages/astro/test/units/dev/collections-mixed-content-errors.test.js @@ -1,5 +1,5 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; import { fileURLToPath } from 'node:url'; import _sync from '../../../dist/core/sync/index.js'; import { createFsWithFallback } from '../test-utils.js'; diff --git a/packages/astro/test/units/dev/collections-renderentry.test.js b/packages/astro/test/units/dev/collections-renderentry.test.js index cf36740270..4c38495776 100644 --- a/packages/astro/test/units/dev/collections-renderentry.test.js +++ b/packages/astro/test/units/dev/collections-renderentry.test.js @@ -1,8 +1,8 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; -import * as cheerio from 'cheerio'; import os from 'node:os'; +import { describe, it } from 'node:test'; import { fileURLToPath } from 'node:url'; +import * as cheerio from 'cheerio'; import { attachContentServerListeners } from '../../../dist/content/server-listeners.js'; import { createFsWithFallback, createRequestAndResponse, runInContainer } from '../test-utils.js'; diff --git a/packages/astro/test/units/dev/dev.test.js b/packages/astro/test/units/dev/dev.test.js index b89e18feb3..85f584e9c3 100644 --- a/packages/astro/test/units/dev/dev.test.js +++ b/packages/astro/test/units/dev/dev.test.js @@ -1,7 +1,7 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; -import * as cheerio from 'cheerio'; +import { describe, it } from 'node:test'; import { fileURLToPath } from 'node:url'; +import * as cheerio from 'cheerio'; import { createFs, createRequestAndResponse, diff --git a/packages/astro/test/units/dev/head-injection.test.js b/packages/astro/test/units/dev/head-injection.test.js index 837fc45b96..0bb7a30f8e 100644 --- a/packages/astro/test/units/dev/head-injection.test.js +++ b/packages/astro/test/units/dev/head-injection.test.js @@ -1,7 +1,7 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; -import * as cheerio from 'cheerio'; +import { describe, it } from 'node:test'; import { fileURLToPath } from 'node:url'; +import * as cheerio from 'cheerio'; import { createFs, createRequestAndResponse, runInContainer } from '../test-utils.js'; const root = new URL('../../fixtures/alias/', import.meta.url); diff --git a/packages/astro/test/units/dev/hydration.test.js b/packages/astro/test/units/dev/hydration.test.js index 720e4b2f39..df48b757d1 100644 --- a/packages/astro/test/units/dev/hydration.test.js +++ b/packages/astro/test/units/dev/hydration.test.js @@ -1,5 +1,5 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; import { fileURLToPath } from 'node:url'; import { createFs, createRequestAndResponse, runInContainer } from '../test-utils.js'; diff --git a/packages/astro/test/units/dev/restart.test.js b/packages/astro/test/units/dev/restart.test.js index 0fad93de4b..a2a858965d 100644 --- a/packages/astro/test/units/dev/restart.test.js +++ b/packages/astro/test/units/dev/restart.test.js @@ -1,7 +1,7 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; -import * as cheerio from 'cheerio'; +import { describe, it } from 'node:test'; import { fileURLToPath } from 'node:url'; +import * as cheerio from 'cheerio'; import { createContainerWithAutomaticRestart, diff --git a/packages/astro/test/units/dev/styles.test.js b/packages/astro/test/units/dev/styles.test.js index a1ab6b9426..3b674108d1 100644 --- a/packages/astro/test/units/dev/styles.test.js +++ b/packages/astro/test/units/dev/styles.test.js @@ -1,7 +1,7 @@ -import { describe, it, before } from 'node:test'; import * as assert from 'node:assert/strict'; -import { getStylesForURL } from '../../../dist/vite-plugin-astro-server/css.js'; +import { before, describe, it } from 'node:test'; import { viteID } from '../../../dist/core/util.js'; +import { getStylesForURL } from '../../../dist/vite-plugin-astro-server/css.js'; const root = new URL('../../fixtures/alias/', import.meta.url); diff --git a/packages/astro/test/units/i18n/astro_i18n.test.js b/packages/astro/test/units/i18n/astro_i18n.test.js index 0e8fdb4b5c..6622308cc5 100644 --- a/packages/astro/test/units/i18n/astro_i18n.test.js +++ b/packages/astro/test/units/i18n/astro_i18n.test.js @@ -1,16 +1,16 @@ +import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; +import { MissingLocale } from '#astro/core/errors/errors-data'; +import { AstroError } from '#astro/core/errors/index'; +import { toRoutingStrategy } from '#astro/i18n/utils'; +import { validateConfig } from '../../../dist/core/config/config.js'; import { - getLocaleRelativeUrl, - getLocaleRelativeUrlList, getLocaleAbsoluteUrl, getLocaleAbsoluteUrlList, + getLocaleRelativeUrl, + getLocaleRelativeUrlList, } from '../../../dist/i18n/index.js'; import { parseLocale } from '../../../dist/i18n/utils.js'; -import { describe, it } from 'node:test'; -import * as assert from 'node:assert/strict'; -import { validateConfig } from '../../../dist/core/config/config.js'; -import { AstroError } from '#astro/core/errors/index'; -import { MissingLocale } from '#astro/core/errors/errors-data'; -import { toRoutingStrategy } from '#astro/i18n/utils'; describe('getLocaleRelativeUrl', () => { it('should correctly return the URL with the base', () => { diff --git a/packages/astro/test/units/integrations/api.test.js b/packages/astro/test/units/integrations/api.test.js index d4b0491c3b..e05c4f9442 100644 --- a/packages/astro/test/units/integrations/api.test.js +++ b/packages/astro/test/units/integrations/api.test.js @@ -1,8 +1,8 @@ -import { runHookBuildSetup, runHookConfigSetup } from '../../../dist/integrations/index.js'; -import { validateSupportedFeatures } from '../../../dist/integrations/astroFeaturesValidation.js'; -import { defaultLogger } from '../test-utils.js'; -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; +import { validateSupportedFeatures } from '../../../dist/integrations/astroFeaturesValidation.js'; +import { runHookBuildSetup, runHookConfigSetup } from '../../../dist/integrations/index.js'; +import { defaultLogger } from '../test-utils.js'; describe('Integration API', () => { it('runHookBuildSetup should work', async () => { diff --git a/packages/astro/test/units/logger/locale.test.js b/packages/astro/test/units/logger/locale.test.js index ddeadfc81f..c427d022aa 100644 --- a/packages/astro/test/units/logger/locale.test.js +++ b/packages/astro/test/units/logger/locale.test.js @@ -1,5 +1,5 @@ -import { describe, it, after } from 'node:test'; import * as assert from 'node:assert/strict'; +import { after, describe, it } from 'node:test'; const LOCALES = ['en_US', 'sv_SE', 'es_419.UTF-8', 'es_ES@euro', 'C']; diff --git a/packages/astro/test/units/render/chunk.test.js b/packages/astro/test/units/render/chunk.test.js index 035e98484a..f34e3d0908 100644 --- a/packages/astro/test/units/render/chunk.test.js +++ b/packages/astro/test/units/render/chunk.test.js @@ -1,7 +1,7 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; -import * as cheerio from 'cheerio'; +import { describe, it } from 'node:test'; import { fileURLToPath } from 'node:url'; +import * as cheerio from 'cheerio'; import { createFs, createRequestAndResponse, runInContainer } from '../test-utils.js'; const root = new URL('../../fixtures/alias/', import.meta.url); diff --git a/packages/astro/test/units/render/components.test.js b/packages/astro/test/units/render/components.test.js index 7fa36e8642..c490cb19e3 100644 --- a/packages/astro/test/units/render/components.test.js +++ b/packages/astro/test/units/render/components.test.js @@ -1,7 +1,7 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; -import * as cheerio from 'cheerio'; +import { describe, it } from 'node:test'; import { fileURLToPath } from 'node:url'; +import * as cheerio from 'cheerio'; import { createFs, createRequestAndResponse, runInContainer } from '../test-utils.js'; const root = new URL('../../fixtures/alias/', import.meta.url); diff --git a/packages/astro/test/units/render/head.test.js b/packages/astro/test/units/render/head.test.js index ce494336af..06fe0705ad 100644 --- a/packages/astro/test/units/render/head.test.js +++ b/packages/astro/test/units/render/head.test.js @@ -1,17 +1,17 @@ -import { describe, it, before } from 'node:test'; import * as assert from 'node:assert/strict'; +import { before, describe, it } from 'node:test'; +import * as cheerio from 'cheerio'; +import { RenderContext } from '../../../dist/core/render-context.js'; import { + Fragment, createComponent, + maybeRenderHead, render, renderComponent, - renderSlot, - maybeRenderHead, renderHead, - Fragment, + renderSlot, } from '../../../dist/runtime/server/index.js'; -import { RenderContext } from '../../../dist/core/render-context.js'; import { createBasicPipeline } from '../test-utils.js'; -import * as cheerio from 'cheerio'; const createAstroModule = (AstroComponent) => ({ default: AstroComponent }); diff --git a/packages/astro/test/units/render/jsx.test.js b/packages/astro/test/units/render/jsx.test.js index e2df9a60d5..0f91ccfc97 100644 --- a/packages/astro/test/units/render/jsx.test.js +++ b/packages/astro/test/units/render/jsx.test.js @@ -1,15 +1,15 @@ -import { describe, it, before } from 'node:test'; import * as assert from 'node:assert/strict'; +import { before, describe, it } from 'node:test'; +import { RenderContext } from '../../../dist/core/render-context.js'; +import { loadRenderer } from '../../../dist/core/render/index.js'; +import { jsx } from '../../../dist/jsx-runtime/index.js'; +import { createAstroJSXComponent, renderer as jsxRenderer } from '../../../dist/jsx/index.js'; import { createComponent, render, renderComponent, renderSlot, } from '../../../dist/runtime/server/index.js'; -import { jsx } from '../../../dist/jsx-runtime/index.js'; -import { loadRenderer } from '../../../dist/core/render/index.js'; -import { RenderContext } from '../../../dist/core/render-context.js'; -import { createAstroJSXComponent, renderer as jsxRenderer } from '../../../dist/jsx/index.js'; import { createBasicPipeline } from '../test-utils.js'; const createAstroModule = (AstroComponent) => ({ default: AstroComponent }); diff --git a/packages/astro/test/units/routing/endpoints.test.js b/packages/astro/test/units/routing/endpoints.test.js index c03a708028..cff44f1b45 100644 --- a/packages/astro/test/units/routing/endpoints.test.js +++ b/packages/astro/test/units/routing/endpoints.test.js @@ -1,14 +1,14 @@ +import * as assert from 'node:assert/strict'; +import { after, before, describe, it } from 'node:test'; +import { fileURLToPath } from 'node:url'; +import { createContainer } from '../../../dist/core/dev/container.js'; +import testAdapter from '../../test-adapter.js'; import { createBasicSettings, createFs, createRequestAndResponse, defaultLogger, } from '../test-utils.js'; -import { fileURLToPath } from 'node:url'; -import { describe, it, before, after } from 'node:test'; -import * as assert from 'node:assert/strict'; -import { createContainer } from '../../../dist/core/dev/container.js'; -import testAdapter from '../../test-adapter.js'; const root = new URL('../../fixtures/api-routes/', import.meta.url); const fileSystem = { diff --git a/packages/astro/test/units/routing/manifest.test.js b/packages/astro/test/units/routing/manifest.test.js index 5e90c6c79b..2e7ff9e7cf 100644 --- a/packages/astro/test/units/routing/manifest.test.js +++ b/packages/astro/test/units/routing/manifest.test.js @@ -1,9 +1,9 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; import { fileURLToPath } from 'node:url'; +import { Logger } from '../../../dist/core/logger/core.js'; import { createRouteManifest } from '../../../dist/core/routing/manifest/create.js'; import { createBasicSettings, createFs } from '../test-utils.js'; -import { Logger } from '../../../dist/core/logger/core.js'; const root = new URL('../../fixtures/alias/', import.meta.url); diff --git a/packages/astro/test/units/routing/route-matching.test.js b/packages/astro/test/units/routing/route-matching.test.js index 01b1d000a1..b2f27d8c9f 100644 --- a/packages/astro/test/units/routing/route-matching.test.js +++ b/packages/astro/test/units/routing/route-matching.test.js @@ -1,20 +1,20 @@ +import * as assert from 'node:assert/strict'; +import { after, before, describe, it } from 'node:test'; +import { fileURLToPath } from 'node:url'; +import * as cheerio from 'cheerio'; +import { createContainer } from '../../../dist/core/dev/container.js'; +import { createViteLoader } from '../../../dist/core/module-loader/vite.js'; +import { createRouteManifest, matchAllRoutes } from '../../../dist/core/routing/index.js'; +import { getSortedPreloadedMatches } from '../../../dist/prerender/routing.js'; +import { DevPipeline } from '../../../dist/vite-plugin-astro-server/pipeline.js'; +import { createDevelopmentManifest } from '../../../dist/vite-plugin-astro-server/plugin.js'; +import testAdapter from '../../test-adapter.js'; import { createBasicSettings, createFs, createRequestAndResponse, defaultLogger, } from '../test-utils.js'; -import { createRouteManifest, matchAllRoutes } from '../../../dist/core/routing/index.js'; -import { fileURLToPath } from 'node:url'; -import { createViteLoader } from '../../../dist/core/module-loader/vite.js'; -import { describe, it, before, after } from 'node:test'; -import * as assert from 'node:assert/strict'; -import { createContainer } from '../../../dist/core/dev/container.js'; -import * as cheerio from 'cheerio'; -import testAdapter from '../../test-adapter.js'; -import { getSortedPreloadedMatches } from '../../../dist/prerender/routing.js'; -import { createDevelopmentManifest } from '../../../dist/vite-plugin-astro-server/plugin.js'; -import { DevPipeline } from '../../../dist/vite-plugin-astro-server/pipeline.js'; const root = new URL('../../fixtures/alias/', import.meta.url); const fileSystem = { diff --git a/packages/astro/test/units/routing/route-sanitization.test.js b/packages/astro/test/units/routing/route-sanitization.test.js index c2367055ab..8024188681 100644 --- a/packages/astro/test/units/routing/route-sanitization.test.js +++ b/packages/astro/test/units/routing/route-sanitization.test.js @@ -1,15 +1,15 @@ +import * as assert from 'node:assert/strict'; +import { after, before, describe, it } from 'node:test'; +import { fileURLToPath } from 'node:url'; +import * as cheerio from 'cheerio'; +import { createContainer } from '../../../dist/core/dev/container.js'; +import testAdapter from '../../test-adapter.js'; import { createBasicSettings, createFs, createRequestAndResponse, defaultLogger, } from '../test-utils.js'; -import { fileURLToPath } from 'node:url'; -import { describe, it, before, after } from 'node:test'; -import * as assert from 'node:assert/strict'; -import { createContainer } from '../../../dist/core/dev/container.js'; -import * as cheerio from 'cheerio'; -import testAdapter from '../../test-adapter.js'; const root = new URL('../../fixtures/alias/', import.meta.url); const fileSystem = { diff --git a/packages/astro/test/units/routing/trailing-slash.test.js b/packages/astro/test/units/routing/trailing-slash.test.js index 292b32ff51..8bbc33f199 100644 --- a/packages/astro/test/units/routing/trailing-slash.test.js +++ b/packages/astro/test/units/routing/trailing-slash.test.js @@ -1,14 +1,14 @@ +import * as assert from 'node:assert/strict'; +import { after, before, describe, it } from 'node:test'; +import { fileURLToPath } from 'node:url'; +import { createContainer } from '../../../dist/core/dev/container.js'; +import testAdapter from '../../test-adapter.js'; import { createBasicSettings, createFs, createRequestAndResponse, defaultLogger, } from '../test-utils.js'; -import { fileURLToPath } from 'node:url'; -import { describe, it, before, after } from 'node:test'; -import * as assert from 'node:assert/strict'; -import { createContainer } from '../../../dist/core/dev/container.js'; -import testAdapter from '../../test-adapter.js'; const root = new URL('../../fixtures/api-routes/', import.meta.url); const fileSystem = { diff --git a/packages/astro/test/units/runtime/astro-global.test.js b/packages/astro/test/units/runtime/astro-global.test.js index a7959a4ec4..8c745c01d6 100644 --- a/packages/astro/test/units/runtime/astro-global.test.js +++ b/packages/astro/test/units/runtime/astro-global.test.js @@ -1,5 +1,5 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; import { createAstro } from '../../../dist/runtime/server/index.js'; describe('astro global', () => { diff --git a/packages/astro/test/units/vite-plugin-astro-server/controller.test.js b/packages/astro/test/units/vite-plugin-astro-server/controller.test.js index 345c2009dc..37fa4dfc42 100644 --- a/packages/astro/test/units/vite-plugin-astro-server/controller.test.js +++ b/packages/astro/test/units/vite-plugin-astro-server/controller.test.js @@ -1,5 +1,5 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; import { createLoader } from '../../../dist/core/module-loader/index.js'; import { createController, diff --git a/packages/astro/test/units/vite-plugin-astro-server/request.test.js b/packages/astro/test/units/vite-plugin-astro-server/request.test.js index 63d2d2a5f2..dfbb5a1b8e 100644 --- a/packages/astro/test/units/vite-plugin-astro-server/request.test.js +++ b/packages/astro/test/units/vite-plugin-astro-server/request.test.js @@ -1,9 +1,11 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; import { createLoader } from '../../../dist/core/module-loader/index.js'; import { createRouteManifest } from '../../../dist/core/routing/index.js'; import { createComponent, render } from '../../../dist/runtime/server/index.js'; import { createController, handleRequest } from '../../../dist/vite-plugin-astro-server/index.js'; +import { DevPipeline } from '../../../dist/vite-plugin-astro-server/pipeline.js'; +import { createDevelopmentManifest } from '../../../dist/vite-plugin-astro-server/plugin.js'; import { createAstroModule, createBasicSettings, @@ -11,8 +13,6 @@ import { createRequestAndResponse, defaultLogger, } from '../test-utils.js'; -import { createDevelopmentManifest } from '../../../dist/vite-plugin-astro-server/plugin.js'; -import { DevPipeline } from '../../../dist/vite-plugin-astro-server/pipeline.js'; async function createDevPipeline(overrides = {}) { const settings = overrides.settings ?? (await createBasicSettings({ root: '/' })); diff --git a/packages/astro/test/units/vite-plugin-astro-server/response.test.js b/packages/astro/test/units/vite-plugin-astro-server/response.test.js index 42cd90e88c..fadaed99f4 100644 --- a/packages/astro/test/units/vite-plugin-astro-server/response.test.js +++ b/packages/astro/test/units/vite-plugin-astro-server/response.test.js @@ -1,14 +1,14 @@ +import * as assert from 'node:assert/strict'; +import { after, before, describe, it } from 'node:test'; +import { fileURLToPath } from 'node:url'; +import { createContainer } from '../../../dist/core/dev/container.js'; +import testAdapter from '../../test-adapter.js'; import { createBasicSettings, createFs, createRequestAndResponse, defaultLogger, } from '../test-utils.js'; -import { fileURLToPath } from 'node:url'; -import { describe, it, before, after } from 'node:test'; -import * as assert from 'node:assert/strict'; -import { createContainer } from '../../../dist/core/dev/container.js'; -import testAdapter from '../../test-adapter.js'; const root = new URL('../../fixtures/api-routes/', import.meta.url); const fileSystem = { diff --git a/packages/astro/test/units/vite-plugin-astro/compile.test.js b/packages/astro/test/units/vite-plugin-astro/compile.test.js index 08b6c2810a..dd779024b2 100644 --- a/packages/astro/test/units/vite-plugin-astro/compile.test.js +++ b/packages/astro/test/units/vite-plugin-astro/compile.test.js @@ -1,9 +1,9 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; +import { pathToFileURL } from 'node:url'; +import { init, parse } from 'es-module-lexer'; import { resolveConfig } from 'vite'; import { compileAstro } from '../../../dist/vite-plugin-astro/compile.js'; -import { init, parse } from 'es-module-lexer'; -import { pathToFileURL } from 'node:url'; const viteConfig = await resolveConfig({ configFile: false }, 'serve'); diff --git a/packages/astro/test/units/vite-plugin-astro/hmr.test.js b/packages/astro/test/units/vite-plugin-astro/hmr.test.js index f7f9681924..22e17b6bdf 100644 --- a/packages/astro/test/units/vite-plugin-astro/hmr.test.js +++ b/packages/astro/test/units/vite-plugin-astro/hmr.test.js @@ -1,5 +1,5 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; import { isStyleOnlyChanged } from '../../../dist/vite-plugin-astro/hmr.js'; describe('isStyleOnlyChanged', () => { diff --git a/packages/astro/test/units/vite-plugin-scanner/scan.test.js b/packages/astro/test/units/vite-plugin-scanner/scan.test.js index d1e389de0c..9b01c9f14a 100644 --- a/packages/astro/test/units/vite-plugin-scanner/scan.test.js +++ b/packages/astro/test/units/vite-plugin-scanner/scan.test.js @@ -1,5 +1,5 @@ -import { describe, it, before, after } from 'node:test'; import * as assert from 'node:assert/strict'; +import { after, before, describe, it } from 'node:test'; import { scan } from '../../../dist/vite-plugin-scanner/scan.js'; describe('astro scan', () => { diff --git a/packages/astro/test/view-transitions.test.js b/packages/astro/test/view-transitions.test.js index 17c1b4b8dc..21d45f7fbd 100644 --- a/packages/astro/test/view-transitions.test.js +++ b/packages/astro/test/view-transitions.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { before, describe, it, after } from 'node:test'; +import { after, before, describe, it } from 'node:test'; import * as cheerio from 'cheerio'; import { loadFixture } from './test-utils.js'; diff --git a/packages/astro/test/vue-component.test.js b/packages/astro/test/vue-component.test.js index c2d753f89e..c7770281f9 100644 --- a/packages/astro/test/vue-component.test.js +++ b/packages/astro/test/vue-component.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { before, describe, 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'; diff --git a/packages/create-astro/test/context.test.js b/packages/create-astro/test/context.test.js index ab8fbadd82..48d2d42976 100644 --- a/packages/create-astro/test/context.test.js +++ b/packages/create-astro/test/context.test.js @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'node:test'; import os from 'node:os'; +import { describe, it } from 'node:test'; import { getContext } from '../dist/index.js'; describe('context', () => { it('no arguments', async () => { diff --git a/packages/create-astro/test/dependencies.test.js b/packages/create-astro/test/dependencies.test.js index 046e96591b..e4eb3d1f41 100644 --- a/packages/create-astro/test/dependencies.test.js +++ b/packages/create-astro/test/dependencies.test.js @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { dependencies } from '../dist/index.js'; import { describe, it } from 'node:test'; +import { dependencies } from '../dist/index.js'; import { setup } from './utils.js'; describe('dependencies', () => { const fixture = setup(); diff --git a/packages/create-astro/test/git.test.js b/packages/create-astro/test/git.test.js index f1c8eba0e8..85854f0d59 100644 --- a/packages/create-astro/test/git.test.js +++ b/packages/create-astro/test/git.test.js @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; -import { describe, it, before, after } from 'node:test'; -import { mkdir, writeFile } from 'node:fs/promises'; import { rmSync } from 'node:fs'; +import { mkdir, writeFile } from 'node:fs/promises'; +import { after, before, describe, it } from 'node:test'; import { git } from '../dist/index.js'; import { setup } from './utils.js'; diff --git a/packages/create-astro/test/typescript.test.js b/packages/create-astro/test/typescript.test.js index 067957676e..3d042c7c44 100644 --- a/packages/create-astro/test/typescript.test.js +++ b/packages/create-astro/test/typescript.test.js @@ -1,10 +1,10 @@ import assert from 'node:assert/strict'; -import { describe, it, beforeEach } from 'node:test'; import fs from 'node:fs'; +import { beforeEach, describe, it } from 'node:test'; import { fileURLToPath } from 'node:url'; -import { typescript, setupTypeScript } from '../dist/index.js'; -import { setup, resetFixtures } from './utils.js'; +import { setupTypeScript, typescript } from '../dist/index.js'; +import { resetFixtures, setup } from './utils.js'; describe('typescript', async () => { const fixture = setup(); diff --git a/packages/create-astro/test/verify.test.js b/packages/create-astro/test/verify.test.js index 9ec7e49e91..ff33501451 100644 --- a/packages/create-astro/test/verify.test.js +++ b/packages/create-astro/test/verify.test.js @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; -import { setup } from './utils.js'; import { verify } from '../dist/index.js'; +import { setup } from './utils.js'; describe('verify', async () => { const fixture = setup(); diff --git a/packages/integrations/lit/test/sass.test.js b/packages/integrations/lit/test/sass.test.js index 1f1ce19c5f..a6cbfae8bc 100644 --- a/packages/integrations/lit/test/sass.test.js +++ b/packages/integrations/lit/test/sass.test.js @@ -1,5 +1,5 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; describe('check', () => { it('should be able to load sass', async () => { diff --git a/packages/integrations/lit/test/server.test.js b/packages/integrations/lit/test/server.test.js index 4b58715af2..b5f3cac9be 100644 --- a/packages/integrations/lit/test/server.test.js +++ b/packages/integrations/lit/test/server.test.js @@ -1,10 +1,10 @@ -import { LitElement, html } from 'lit'; -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; +import * as cheerio from 'cheerio'; +import { LitElement, html } from 'lit'; // Must come after lit import because @lit/reactive-element defines // globalThis.customElements which the server shim expects to be defined. import server from '../server.js'; -import * as cheerio from 'cheerio'; const { check, renderToStaticMarkup } = server; diff --git a/packages/integrations/markdoc/test/content-collections.test.js b/packages/integrations/markdoc/test/content-collections.test.js index cfd1c80c7e..ef4ebfceac 100644 --- a/packages/integrations/markdoc/test/content-collections.test.js +++ b/packages/integrations/markdoc/test/content-collections.test.js @@ -1,8 +1,8 @@ -import { parse as parseDevalue } from 'devalue'; -import { loadFixture, fixLineEndings } from '../../../astro/test/test-utils.js'; -import markdoc from '../dist/index.js'; import assert from 'node:assert/strict'; import { after, before, describe, it } from 'node:test'; +import { parse as parseDevalue } from 'devalue'; +import { fixLineEndings, loadFixture } from '../../../astro/test/test-utils.js'; +import markdoc from '../dist/index.js'; function formatPost(post) { return { diff --git a/packages/integrations/markdoc/test/headings.test.js b/packages/integrations/markdoc/test/headings.test.js index b87f6408e6..330d3356b2 100644 --- a/packages/integrations/markdoc/test/headings.test.js +++ b/packages/integrations/markdoc/test/headings.test.js @@ -1,7 +1,7 @@ -import { parseHTML } from 'linkedom'; -import { loadFixture } from '../../../astro/test/test-utils.js'; import assert from 'node:assert/strict'; import { after, before, describe, it } from 'node:test'; +import { parseHTML } from 'linkedom'; +import { loadFixture } from '../../../astro/test/test-utils.js'; async function getFixture(name) { return await loadFixture({ diff --git a/packages/integrations/markdoc/test/image-assets.test.js b/packages/integrations/markdoc/test/image-assets.test.js index 880ee9b267..22534c6070 100644 --- a/packages/integrations/markdoc/test/image-assets.test.js +++ b/packages/integrations/markdoc/test/image-assets.test.js @@ -1,7 +1,7 @@ -import { parseHTML } from 'linkedom'; -import { loadFixture } from '../../../astro/test/test-utils.js'; import assert from 'node:assert/strict'; import { after, before, describe, it } from 'node:test'; +import { parseHTML } from 'linkedom'; +import { loadFixture } from '../../../astro/test/test-utils.js'; const root = new URL('./fixtures/image-assets/', import.meta.url); diff --git a/packages/integrations/markdoc/test/propagated-assets.test.js b/packages/integrations/markdoc/test/propagated-assets.test.js index 652c60014a..a0768448f1 100644 --- a/packages/integrations/markdoc/test/propagated-assets.test.js +++ b/packages/integrations/markdoc/test/propagated-assets.test.js @@ -1,7 +1,7 @@ -import { parseHTML } from 'linkedom'; -import { loadFixture } from '../../../astro/test/test-utils.js'; import assert from 'node:assert/strict'; import { after, before, describe, it } from 'node:test'; +import { parseHTML } from 'linkedom'; +import { loadFixture } from '../../../astro/test/test-utils.js'; describe('Markdoc - propagated assets', () => { let fixture; diff --git a/packages/integrations/markdoc/test/render-html.test.js b/packages/integrations/markdoc/test/render-html.test.js index d83a916071..785599ae57 100644 --- a/packages/integrations/markdoc/test/render-html.test.js +++ b/packages/integrations/markdoc/test/render-html.test.js @@ -1,7 +1,7 @@ -import { parseHTML } from 'linkedom'; -import { loadFixture } from '../../../astro/test/test-utils.js'; import assert from 'node:assert/strict'; import { after, before, describe, it } from 'node:test'; +import { parseHTML } from 'linkedom'; +import { loadFixture } from '../../../astro/test/test-utils.js'; async function getFixture(name) { return await loadFixture({ diff --git a/packages/integrations/markdoc/test/render.test.js b/packages/integrations/markdoc/test/render.test.js index e5b8da74fa..0960a980ce 100644 --- a/packages/integrations/markdoc/test/render.test.js +++ b/packages/integrations/markdoc/test/render.test.js @@ -1,7 +1,7 @@ -import { parseHTML } from 'linkedom'; -import { loadFixture } from '../../../astro/test/test-utils.js'; import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; +import { parseHTML } from 'linkedom'; +import { loadFixture } from '../../../astro/test/test-utils.js'; async function getFixture(name) { return await loadFixture({ diff --git a/packages/integrations/markdoc/test/syntax-highlighting.test.js b/packages/integrations/markdoc/test/syntax-highlighting.test.js index 1d0f6127ba..bab309c871 100644 --- a/packages/integrations/markdoc/test/syntax-highlighting.test.js +++ b/packages/integrations/markdoc/test/syntax-highlighting.test.js @@ -1,11 +1,11 @@ -import { parseHTML } from 'linkedom'; -import Markdoc from '@markdoc/markdoc'; -import shiki from '../dist/extensions/shiki.js'; -import prism from '../dist/extensions/prism.js'; -import { setupConfig } from '../dist/runtime.js'; -import { isHTMLString } from 'astro/runtime/server/index.js'; import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; +import Markdoc from '@markdoc/markdoc'; +import { isHTMLString } from 'astro/runtime/server/index.js'; +import { parseHTML } from 'linkedom'; +import prism from '../dist/extensions/prism.js'; +import shiki from '../dist/extensions/shiki.js'; +import { setupConfig } from '../dist/runtime.js'; const entry = ` \`\`\`ts diff --git a/packages/integrations/markdoc/test/variables.test.js b/packages/integrations/markdoc/test/variables.test.js index c26ca3c45b..9873afcb77 100644 --- a/packages/integrations/markdoc/test/variables.test.js +++ b/packages/integrations/markdoc/test/variables.test.js @@ -1,8 +1,8 @@ +import assert from 'node:assert/strict'; +import { after, before, describe, it } from 'node:test'; import { parseHTML } from 'linkedom'; import { loadFixture } from '../../../astro/test/test-utils.js'; import markdoc from '../dist/index.js'; -import assert from 'node:assert/strict'; -import { after, before, describe, it } from 'node:test'; const root = new URL('./fixtures/variables/', import.meta.url); diff --git a/packages/integrations/mdx/test/css-head-mdx.test.js b/packages/integrations/mdx/test/css-head-mdx.test.js index 8b57646250..5caab3d059 100644 --- a/packages/integrations/mdx/test/css-head-mdx.test.js +++ b/packages/integrations/mdx/test/css-head-mdx.test.js @@ -1,10 +1,10 @@ import mdx from '@astrojs/mdx'; -import { parseHTML } from 'linkedom'; -import { describe, it, before } from 'node:test'; import * as assert from 'node:assert/strict'; -import { loadFixture } from '../../../astro/test/test-utils.js'; +import { before, describe, it } from 'node:test'; import * as cheerio from 'cheerio'; +import { parseHTML } from 'linkedom'; +import { loadFixture } from '../../../astro/test/test-utils.js'; describe('Head injection w/ MDX', () => { let fixture; diff --git a/packages/integrations/mdx/test/invalid-mdx-component.test.js b/packages/integrations/mdx/test/invalid-mdx-component.test.js index 4621b73da6..4e68fea647 100644 --- a/packages/integrations/mdx/test/invalid-mdx-component.test.js +++ b/packages/integrations/mdx/test/invalid-mdx-component.test.js @@ -1,5 +1,5 @@ -import { describe, it, before } from 'node:test'; import * as assert from 'node:assert/strict'; +import { before, describe, it } from 'node:test'; import { loadFixture } from '../../../astro/test/test-utils.js'; import mdx from '../dist/index.js'; diff --git a/packages/integrations/mdx/test/mdx-astro-markdown-remarkRehype.test.js b/packages/integrations/mdx/test/mdx-astro-markdown-remarkRehype.test.js index c9f846a3ae..e29efa45b5 100644 --- a/packages/integrations/mdx/test/mdx-astro-markdown-remarkRehype.test.js +++ b/packages/integrations/mdx/test/mdx-astro-markdown-remarkRehype.test.js @@ -1,7 +1,7 @@ import mdx from '@astrojs/mdx'; -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; import { parseHTML } from 'linkedom'; import { loadFixture } from '../../../astro/test/test-utils.js'; diff --git a/packages/integrations/mdx/test/mdx-component.test.js b/packages/integrations/mdx/test/mdx-component.test.js index 3bb213001e..1983730e7e 100644 --- a/packages/integrations/mdx/test/mdx-component.test.js +++ b/packages/integrations/mdx/test/mdx-component.test.js @@ -1,7 +1,7 @@ import mdx from '@astrojs/mdx'; -import { describe, it, before, after } from 'node:test'; import * as assert from 'node:assert/strict'; +import { after, before, describe, it } from 'node:test'; import { parseHTML } from 'linkedom'; import { loadFixture } from '../../../astro/test/test-utils.js'; diff --git a/packages/integrations/mdx/test/mdx-escape.test.js b/packages/integrations/mdx/test/mdx-escape.test.js index f758dc50f8..0d1200fe7d 100644 --- a/packages/integrations/mdx/test/mdx-escape.test.js +++ b/packages/integrations/mdx/test/mdx-escape.test.js @@ -1,7 +1,7 @@ import mdx from '@astrojs/mdx'; -import { describe, it, before } from 'node:test'; import * as assert from 'node:assert/strict'; +import { before, describe, it } from 'node:test'; import { parseHTML } from 'linkedom'; import { loadFixture } from '../../../astro/test/test-utils.js'; diff --git a/packages/integrations/mdx/test/mdx-frontmatter-injection.test.js b/packages/integrations/mdx/test/mdx-frontmatter-injection.test.js index 0f8e9524f4..90ec45e4e8 100644 --- a/packages/integrations/mdx/test/mdx-frontmatter-injection.test.js +++ b/packages/integrations/mdx/test/mdx-frontmatter-injection.test.js @@ -1,5 +1,5 @@ -import { describe, it, before } from 'node:test'; import * as assert from 'node:assert/strict'; +import { before, describe, it } from 'node:test'; import { parseHTML } from 'linkedom'; import { loadFixture } from '../../../astro/test/test-utils.js'; diff --git a/packages/integrations/mdx/test/mdx-frontmatter.test.js b/packages/integrations/mdx/test/mdx-frontmatter.test.js index 94ddc5e219..3fcbf28e80 100644 --- a/packages/integrations/mdx/test/mdx-frontmatter.test.js +++ b/packages/integrations/mdx/test/mdx-frontmatter.test.js @@ -1,7 +1,7 @@ import mdx from '@astrojs/mdx'; -import { describe, it, before } from 'node:test'; import * as assert from 'node:assert/strict'; +import { before, describe, it } from 'node:test'; import { parseHTML } from 'linkedom'; import { loadFixture } from '../../../astro/test/test-utils.js'; diff --git a/packages/integrations/mdx/test/mdx-get-headings.test.js b/packages/integrations/mdx/test/mdx-get-headings.test.js index 5e5b318ea4..29bb427ccd 100644 --- a/packages/integrations/mdx/test/mdx-get-headings.test.js +++ b/packages/integrations/mdx/test/mdx-get-headings.test.js @@ -2,8 +2,8 @@ import { rehypeHeadingIds } from '@astrojs/markdown-remark'; import mdx from '@astrojs/mdx'; import { visit } from 'unist-util-visit'; -import { describe, it, before } from 'node:test'; import * as assert from 'node:assert/strict'; +import { before, describe, it } from 'node:test'; import { parseHTML } from 'linkedom'; import { loadFixture } from '../../../astro/test/test-utils.js'; diff --git a/packages/integrations/mdx/test/mdx-get-static-paths.test.js b/packages/integrations/mdx/test/mdx-get-static-paths.test.js index 153ddad7cb..845676f8f2 100644 --- a/packages/integrations/mdx/test/mdx-get-static-paths.test.js +++ b/packages/integrations/mdx/test/mdx-get-static-paths.test.js @@ -1,9 +1,9 @@ import mdx from '@astrojs/mdx'; -import { describe, it, before } from 'node:test'; import * as assert from 'node:assert/strict'; -import { loadFixture } from '../../../astro/test/test-utils.js'; +import { before, describe, it } from 'node:test'; import * as cheerio from 'cheerio'; +import { loadFixture } from '../../../astro/test/test-utils.js'; const FIXTURE_ROOT = new URL('./fixtures/mdx-get-static-paths', import.meta.url); diff --git a/packages/integrations/mdx/test/mdx-images.test.js b/packages/integrations/mdx/test/mdx-images.test.js index e070f23586..d4af271ec5 100644 --- a/packages/integrations/mdx/test/mdx-images.test.js +++ b/packages/integrations/mdx/test/mdx-images.test.js @@ -1,5 +1,5 @@ -import { describe, it, before, after } from 'node:test'; import * as assert from 'node:assert/strict'; +import { after, before, describe, it } from 'node:test'; import { parseHTML } from 'linkedom'; import { loadFixture } from '../../../astro/test/test-utils.js'; diff --git a/packages/integrations/mdx/test/mdx-infinite-loop.test.js b/packages/integrations/mdx/test/mdx-infinite-loop.test.js index a13554fbe4..ed98d5c6d9 100644 --- a/packages/integrations/mdx/test/mdx-infinite-loop.test.js +++ b/packages/integrations/mdx/test/mdx-infinite-loop.test.js @@ -1,7 +1,7 @@ import mdx from '@astrojs/mdx'; -import { describe, it, before } from 'node:test'; import * as assert from 'node:assert/strict'; +import { before, describe, it } from 'node:test'; import { loadFixture } from '../../../astro/test/test-utils.js'; describe('MDX Infinite Loop', () => { diff --git a/packages/integrations/mdx/test/mdx-math.test.js b/packages/integrations/mdx/test/mdx-math.test.js index cc6169c554..908a88e118 100644 --- a/packages/integrations/mdx/test/mdx-math.test.js +++ b/packages/integrations/mdx/test/mdx-math.test.js @@ -1,11 +1,11 @@ -import mdx from '@astrojs/mdx'; -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; +import mdx from '@astrojs/mdx'; import { parseHTML } from 'linkedom'; -import { loadFixture } from '../../../astro/test/test-utils.js'; -import remarkMath from 'remark-math'; import rehypeMathjaxSvg from 'rehype-mathjax'; import rehypeMathjaxChtml from 'rehype-mathjax/chtml'; +import remarkMath from 'remark-math'; +import { loadFixture } from '../../../astro/test/test-utils.js'; const FIXTURE_ROOT = new URL('./fixtures/mdx-math/', import.meta.url); diff --git a/packages/integrations/mdx/test/mdx-namespace.test.js b/packages/integrations/mdx/test/mdx-namespace.test.js index 04c07817d4..13137e40e9 100644 --- a/packages/integrations/mdx/test/mdx-namespace.test.js +++ b/packages/integrations/mdx/test/mdx-namespace.test.js @@ -1,5 +1,5 @@ -import { describe, it, before, after } from 'node:test'; import * as assert from 'node:assert/strict'; +import { after, before, describe, it } from 'node:test'; import { parseHTML } from 'linkedom'; import { loadFixture } from '../../../astro/test/test-utils.js'; diff --git a/packages/integrations/mdx/test/mdx-optimize.test.js b/packages/integrations/mdx/test/mdx-optimize.test.js index 7d9a68c950..f504a49c9d 100644 --- a/packages/integrations/mdx/test/mdx-optimize.test.js +++ b/packages/integrations/mdx/test/mdx-optimize.test.js @@ -1,5 +1,5 @@ -import { describe, it, before } from 'node:test'; import * as assert from 'node:assert/strict'; +import { before, describe, it } from 'node:test'; import { parseHTML } from 'linkedom'; import { loadFixture } from '../../../astro/test/test-utils.js'; diff --git a/packages/integrations/mdx/test/mdx-page.test.js b/packages/integrations/mdx/test/mdx-page.test.js index 6a97fb7366..7948de6531 100644 --- a/packages/integrations/mdx/test/mdx-page.test.js +++ b/packages/integrations/mdx/test/mdx-page.test.js @@ -1,5 +1,5 @@ -import { describe, it, before, after } from 'node:test'; import * as assert from 'node:assert/strict'; +import { after, before, describe, it } from 'node:test'; import { parseHTML } from 'linkedom'; import { loadFixture } from '../../../astro/test/test-utils.js'; diff --git a/packages/integrations/mdx/test/mdx-plugins.test.js b/packages/integrations/mdx/test/mdx-plugins.test.js index ae98b48998..1791acc524 100644 --- a/packages/integrations/mdx/test/mdx-plugins.test.js +++ b/packages/integrations/mdx/test/mdx-plugins.test.js @@ -1,11 +1,11 @@ import mdx from '@astrojs/mdx'; -import { describe, it, before } from 'node:test'; import * as assert from 'node:assert/strict'; -import { parseHTML } from 'linkedom'; -import { loadFixture } from '../../../astro/test/test-utils.js'; -import remarkToc from 'remark-toc'; +import { before, describe, it } from 'node:test'; import { visit as estreeVisit } from 'estree-util-visit'; +import { parseHTML } from 'linkedom'; +import remarkToc from 'remark-toc'; +import { loadFixture } from '../../../astro/test/test-utils.js'; const FIXTURE_ROOT = new URL('./fixtures/mdx-plugins/', import.meta.url); const FILE = '/with-plugins/index.html'; diff --git a/packages/integrations/mdx/test/mdx-plus-react.test.js b/packages/integrations/mdx/test/mdx-plus-react.test.js index eb59552829..08c0f118c0 100644 --- a/packages/integrations/mdx/test/mdx-plus-react.test.js +++ b/packages/integrations/mdx/test/mdx-plus-react.test.js @@ -1,5 +1,5 @@ -import { describe, it, before } from 'node:test'; import * as assert from 'node:assert/strict'; +import { before, describe, it } from 'node:test'; import { parseHTML } from 'linkedom'; import { loadFixture } from '../../../astro/test/test-utils.js'; diff --git a/packages/integrations/mdx/test/mdx-script-style-raw.test.js b/packages/integrations/mdx/test/mdx-script-style-raw.test.js index cac3e78230..5b276f043e 100644 --- a/packages/integrations/mdx/test/mdx-script-style-raw.test.js +++ b/packages/integrations/mdx/test/mdx-script-style-raw.test.js @@ -1,6 +1,6 @@ -import mdx from '@astrojs/mdx'; -import { describe, it, before, after } from 'node:test'; import * as assert from 'node:assert/strict'; +import { after, before, describe, it } from 'node:test'; +import mdx from '@astrojs/mdx'; import { parseHTML } from 'linkedom'; import { loadFixture } from '../../../astro/test/test-utils.js'; diff --git a/packages/integrations/mdx/test/mdx-slots.test.js b/packages/integrations/mdx/test/mdx-slots.test.js index e5c5f77d4a..e8dc68e67f 100644 --- a/packages/integrations/mdx/test/mdx-slots.test.js +++ b/packages/integrations/mdx/test/mdx-slots.test.js @@ -1,7 +1,7 @@ import mdx from '@astrojs/mdx'; -import { describe, it, before, after } from 'node:test'; import * as assert from 'node:assert/strict'; +import { after, before, describe, it } from 'node:test'; import { parseHTML } from 'linkedom'; import { loadFixture } from '../../../astro/test/test-utils.js'; diff --git a/packages/integrations/mdx/test/mdx-syntax-highlighting.test.js b/packages/integrations/mdx/test/mdx-syntax-highlighting.test.js index e5ce041267..662c1a0cdc 100644 --- a/packages/integrations/mdx/test/mdx-syntax-highlighting.test.js +++ b/packages/integrations/mdx/test/mdx-syntax-highlighting.test.js @@ -1,11 +1,11 @@ import mdx from '@astrojs/mdx'; -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; import { parseHTML } from 'linkedom'; -import { loadFixture } from '../../../astro/test/test-utils.js'; -import shikiTwoslash from 'remark-shiki-twoslash'; import rehypePrettyCode from 'rehype-pretty-code'; +import shikiTwoslash from 'remark-shiki-twoslash'; +import { loadFixture } from '../../../astro/test/test-utils.js'; const FIXTURE_ROOT = new URL('./fixtures/mdx-syntax-hightlighting/', import.meta.url); diff --git a/packages/integrations/mdx/test/mdx-url-export.test.js b/packages/integrations/mdx/test/mdx-url-export.test.js index 6ab4750701..db7288bff2 100644 --- a/packages/integrations/mdx/test/mdx-url-export.test.js +++ b/packages/integrations/mdx/test/mdx-url-export.test.js @@ -1,7 +1,7 @@ import mdx from '@astrojs/mdx'; -import { describe, it, before } from 'node:test'; import * as assert from 'node:assert/strict'; +import { before, describe, it } from 'node:test'; import { loadFixture } from '../../../astro/test/test-utils.js'; describe('MDX url export', () => { diff --git a/packages/integrations/mdx/test/mdx-vite-env-vars.test.js b/packages/integrations/mdx/test/mdx-vite-env-vars.test.js index 0be5f735ff..1270fe5e60 100644 --- a/packages/integrations/mdx/test/mdx-vite-env-vars.test.js +++ b/packages/integrations/mdx/test/mdx-vite-env-vars.test.js @@ -1,5 +1,5 @@ -import { describe, it, before } from 'node:test'; import * as assert from 'node:assert/strict'; +import { before, describe, it } from 'node:test'; import { parseHTML } from 'linkedom'; import { loadFixture } from '../../../astro/test/test-utils.js'; diff --git a/packages/integrations/mdx/test/remark-imgattr.test.js b/packages/integrations/mdx/test/remark-imgattr.test.js index 02f155fd4e..ebd9207b26 100644 --- a/packages/integrations/mdx/test/remark-imgattr.test.js +++ b/packages/integrations/mdx/test/remark-imgattr.test.js @@ -1,5 +1,5 @@ -import { describe, it, before, after } from 'node:test'; import * as assert from 'node:assert/strict'; +import { after, before, describe, it } from 'node:test'; import * as cheerio from 'cheerio'; import { loadFixture } from '../../../astro/test/test-utils.js'; diff --git a/packages/integrations/node/test/api-route.test.js b/packages/integrations/node/test/api-route.test.js index 9e0165cb98..804a5ccf47 100644 --- a/packages/integrations/node/test/api-route.test.js +++ b/packages/integrations/node/test/api-route.test.js @@ -1,8 +1,8 @@ -import nodejs from '../dist/index.js'; -import { loadFixture, createRequestAndResponse } from './test-utils.js'; -import crypto from 'node:crypto'; -import { describe, it, before, after } from 'node:test'; import * as assert from 'node:assert/strict'; +import crypto from 'node:crypto'; +import { after, before, describe, it } from 'node:test'; +import nodejs from '../dist/index.js'; +import { createRequestAndResponse, loadFixture } from './test-utils.js'; describe('API routes', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/integrations/node/test/assets.test.js b/packages/integrations/node/test/assets.test.js index bcd9bb4bd7..0b71f94cd6 100644 --- a/packages/integrations/node/test/assets.test.js +++ b/packages/integrations/node/test/assets.test.js @@ -1,8 +1,8 @@ import * as assert from 'node:assert/strict'; -import { describe, it, before, after } from 'node:test'; +import { after, before, describe, it } from 'node:test'; +import * as cheerio from 'cheerio'; import nodejs from '../dist/index.js'; import { loadFixture } from './test-utils.js'; -import * as cheerio from 'cheerio'; describe('Assets', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/integrations/node/test/bad-urls.test.js b/packages/integrations/node/test/bad-urls.test.js index 6d6c0a2e92..cdc0158ff9 100644 --- a/packages/integrations/node/test/bad-urls.test.js +++ b/packages/integrations/node/test/bad-urls.test.js @@ -1,5 +1,5 @@ import * as assert from 'node:assert/strict'; -import { describe, it, before, after } from 'node:test'; +import { after, before, describe, it } from 'node:test'; import nodejs from '../dist/index.js'; import { loadFixture } from './test-utils.js'; diff --git a/packages/integrations/node/test/encoded.test.js b/packages/integrations/node/test/encoded.test.js index 15b5654b1f..edc6ae78b0 100644 --- a/packages/integrations/node/test/encoded.test.js +++ b/packages/integrations/node/test/encoded.test.js @@ -1,7 +1,7 @@ import * as assert from 'node:assert/strict'; -import { describe, it, before } from 'node:test'; +import { before, describe, it } from 'node:test'; import nodejs from '../dist/index.js'; -import { loadFixture, createRequestAndResponse } from './test-utils.js'; +import { createRequestAndResponse, loadFixture } from './test-utils.js'; describe('Encoded Pathname', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/integrations/node/test/errors.test.js b/packages/integrations/node/test/errors.test.js index c4212f0586..95bb1be854 100644 --- a/packages/integrations/node/test/errors.test.js +++ b/packages/integrations/node/test/errors.test.js @@ -1,8 +1,8 @@ import assert from 'node:assert/strict'; -import { describe, it, before, after } from 'node:test'; +import { after, before, describe, it } from 'node:test'; +import * as cheerio from 'cheerio'; import nodejs from '../dist/index.js'; import { loadFixture } from './test-utils.js'; -import * as cheerio from 'cheerio'; describe('Errors', () => { let fixture; diff --git a/packages/integrations/node/test/headers.test.js b/packages/integrations/node/test/headers.test.js index b74af99524..00b1766c79 100644 --- a/packages/integrations/node/test/headers.test.js +++ b/packages/integrations/node/test/headers.test.js @@ -1,7 +1,7 @@ import * as assert from 'node:assert/strict'; -import { describe, it, before } from 'node:test'; +import { before, describe, it } from 'node:test'; import nodejs from '../dist/index.js'; -import { loadFixture, createRequestAndResponse } from './test-utils.js'; +import { createRequestAndResponse, loadFixture } from './test-utils.js'; describe('Node Adapter Headers', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/integrations/node/test/image.test.js b/packages/integrations/node/test/image.test.js index b315c1a301..c4758f96b2 100644 --- a/packages/integrations/node/test/image.test.js +++ b/packages/integrations/node/test/image.test.js @@ -1,5 +1,5 @@ import * as assert from 'node:assert/strict'; -import { describe, it, before, after } from 'node:test'; +import { after, before, describe, it } from 'node:test'; import nodejs from '../dist/index.js'; import { loadFixture } from './test-utils.js'; diff --git a/packages/integrations/node/test/locals.test.js b/packages/integrations/node/test/locals.test.js index a310c729d8..6d2776079d 100644 --- a/packages/integrations/node/test/locals.test.js +++ b/packages/integrations/node/test/locals.test.js @@ -1,7 +1,7 @@ import * as assert from 'node:assert/strict'; -import { describe, it, before } from 'node:test'; +import { before, describe, it } from 'node:test'; import nodejs from '../dist/index.js'; -import { loadFixture, createRequestAndResponse } from './test-utils.js'; +import { createRequestAndResponse, loadFixture } from './test-utils.js'; describe('API routes', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/integrations/node/test/node-middleware.test.js b/packages/integrations/node/test/node-middleware.test.js index 889f72315e..fa496e871f 100644 --- a/packages/integrations/node/test/node-middleware.test.js +++ b/packages/integrations/node/test/node-middleware.test.js @@ -1,9 +1,9 @@ import * as assert from 'node:assert/strict'; -import { describe, it, before, after } from 'node:test'; -import nodejs from '../dist/index.js'; -import { loadFixture, waitServerListen } from './test-utils.js'; +import { after, before, describe, it } from 'node:test'; import * as cheerio from 'cheerio'; import express from 'express'; +import nodejs from '../dist/index.js'; +import { loadFixture, waitServerListen } from './test-utils.js'; /** * @typedef {import('../../../astro/test/test-utils').Fixture} Fixture diff --git a/packages/integrations/node/test/prerender-404-500.test.js b/packages/integrations/node/test/prerender-404-500.test.js index 4195db0ec6..afa23a1510 100644 --- a/packages/integrations/node/test/prerender-404-500.test.js +++ b/packages/integrations/node/test/prerender-404-500.test.js @@ -1,8 +1,8 @@ import * as assert from 'node:assert/strict'; -import { describe, it, before, after } from 'node:test'; +import { after, before, describe, it } from 'node:test'; +import * as cheerio from 'cheerio'; import nodejs from '../dist/index.js'; import { loadFixture, waitServerListen } from './test-utils.js'; -import * as cheerio from 'cheerio'; /** * @typedef {import('../../../astro/test/test-utils').Fixture} Fixture diff --git a/packages/integrations/node/test/prerender.test.js b/packages/integrations/node/test/prerender.test.js index de570511e8..bf34fc99dd 100644 --- a/packages/integrations/node/test/prerender.test.js +++ b/packages/integrations/node/test/prerender.test.js @@ -1,8 +1,8 @@ import * as assert from 'node:assert/strict'; -import { describe, it, before, after } from 'node:test'; +import { after, before, describe, it } from 'node:test'; +import * as cheerio from 'cheerio'; import nodejs from '../dist/index.js'; import { loadFixture, waitServerListen } from './test-utils.js'; -import * as cheerio from 'cheerio'; /** * @typedef {import('../../../astro/test/test-utils').Fixture} Fixture diff --git a/packages/integrations/node/test/url-protocol.test.js b/packages/integrations/node/test/url-protocol.test.js index 444d47ed51..94d53104b9 100644 --- a/packages/integrations/node/test/url-protocol.test.js +++ b/packages/integrations/node/test/url-protocol.test.js @@ -1,5 +1,5 @@ import * as assert from 'node:assert/strict'; -import { describe, it, before } from 'node:test'; +import { before, describe, it } from 'node:test'; import { TLSSocket } from 'node:tls'; import nodejs from '../dist/index.js'; import { createRequestAndResponse, loadFixture } from './test-utils.js'; diff --git a/packages/integrations/node/test/well-known-locations.test.js b/packages/integrations/node/test/well-known-locations.test.js index 39d7ccedbd..0951d6c27c 100644 --- a/packages/integrations/node/test/well-known-locations.test.js +++ b/packages/integrations/node/test/well-known-locations.test.js @@ -1,5 +1,5 @@ import * as assert from 'node:assert/strict'; -import { describe, it, before, after } from 'node:test'; +import { after, before, describe, it } from 'node:test'; import nodejs from '../dist/index.js'; import { loadFixture } from './test-utils.js'; diff --git a/packages/integrations/react/test/react-component.test.js b/packages/integrations/react/test/react-component.test.js index 3e07c6d590..44dbb138fa 100644 --- a/packages/integrations/react/test/react-component.test.js +++ b/packages/integrations/react/test/react-component.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { describe, it, before, after } from 'node:test'; +import { after, before, describe, it } from 'node:test'; import { load as cheerioLoad } from 'cheerio'; import { isWindows, loadFixture } from '../../../astro/test/test-utils.js'; diff --git a/packages/integrations/sitemap/test/base-path.test.js b/packages/integrations/sitemap/test/base-path.test.js index dd80fd29ac..0417e4e2bf 100644 --- a/packages/integrations/sitemap/test/base-path.test.js +++ b/packages/integrations/sitemap/test/base-path.test.js @@ -1,6 +1,6 @@ -import { loadFixture, readXML } from './test-utils.js'; import assert from 'node:assert/strict'; import { before, describe, it } from 'node:test'; +import { loadFixture, readXML } from './test-utils.js'; describe('URLs with base path', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/integrations/sitemap/test/dynamic-path.test.js b/packages/integrations/sitemap/test/dynamic-path.test.js index 851462ceb2..eab3b912c1 100644 --- a/packages/integrations/sitemap/test/dynamic-path.test.js +++ b/packages/integrations/sitemap/test/dynamic-path.test.js @@ -1,6 +1,6 @@ +import assert from 'node:assert/strict'; import { before, describe, it } from 'node:test'; import { loadFixture, readXML } from './test-utils.js'; -import assert from 'node:assert/strict'; describe('Dynamic with rest parameter', () => { /** @type {import('./test-utils.js').Fixture} */ diff --git a/packages/integrations/sitemap/test/filter.test.js b/packages/integrations/sitemap/test/filter.test.js index 57faa47f7e..adecb59e6c 100644 --- a/packages/integrations/sitemap/test/filter.test.js +++ b/packages/integrations/sitemap/test/filter.test.js @@ -1,7 +1,7 @@ -import { loadFixture, readXML } from './test-utils.js'; import assert from 'node:assert/strict'; import { before, describe, it } from 'node:test'; import { sitemap } from './fixtures/static/deps.mjs'; +import { loadFixture, readXML } from './test-utils.js'; describe('Filter support', () => { /** @type {import('./test-utils.js').Fixture} */ diff --git a/packages/integrations/sitemap/test/prefix.test.js b/packages/integrations/sitemap/test/prefix.test.js index fdd538d0f3..16ec44e9f3 100644 --- a/packages/integrations/sitemap/test/prefix.test.js +++ b/packages/integrations/sitemap/test/prefix.test.js @@ -1,7 +1,7 @@ -import { loadFixture, readXML } from './test-utils.js'; -import { sitemap } from './fixtures/static/deps.mjs'; import assert from 'node:assert/strict'; import { before, describe, it } from 'node:test'; +import { sitemap } from './fixtures/static/deps.mjs'; +import { loadFixture, readXML } from './test-utils.js'; describe('Prefix support', () => { /** @type {import('./test-utils.js').Fixture} */ diff --git a/packages/integrations/sitemap/test/routes.test.js b/packages/integrations/sitemap/test/routes.test.js index 326cb64ef9..00d6ccde30 100644 --- a/packages/integrations/sitemap/test/routes.test.js +++ b/packages/integrations/sitemap/test/routes.test.js @@ -1,6 +1,6 @@ -import { loadFixture, readXML } from './test-utils.js'; import assert from 'node:assert/strict'; import { before, describe, it } from 'node:test'; +import { loadFixture, readXML } from './test-utils.js'; describe('routes', () => { /** @type {import('./test-utils.js').Fixture} */ diff --git a/packages/integrations/sitemap/test/ssr.test.js b/packages/integrations/sitemap/test/ssr.test.js index d4bbd52642..b5c92698b3 100644 --- a/packages/integrations/sitemap/test/ssr.test.js +++ b/packages/integrations/sitemap/test/ssr.test.js @@ -1,6 +1,6 @@ -import { loadFixture, readXML } from './test-utils.js'; import assert from 'node:assert/strict'; import { before, describe, it } from 'node:test'; +import { loadFixture, readXML } from './test-utils.js'; describe('SSR support', () => { /** @type {import('./test-utils.js').Fixture} */ diff --git a/packages/integrations/sitemap/test/staticPaths.test.js b/packages/integrations/sitemap/test/staticPaths.test.js index 4054ad9304..abc687faf3 100644 --- a/packages/integrations/sitemap/test/staticPaths.test.js +++ b/packages/integrations/sitemap/test/staticPaths.test.js @@ -1,6 +1,6 @@ -import { loadFixture, readXML } from './test-utils.js'; import assert from 'node:assert/strict'; import { before, describe, it } from 'node:test'; +import { loadFixture, readXML } from './test-utils.js'; describe('getStaticPaths support', () => { /** @type {import('./test-utils.js').Fixture} */ diff --git a/packages/integrations/sitemap/test/trailing-slash.test.js b/packages/integrations/sitemap/test/trailing-slash.test.js index bdedf76873..e0a6158fbe 100644 --- a/packages/integrations/sitemap/test/trailing-slash.test.js +++ b/packages/integrations/sitemap/test/trailing-slash.test.js @@ -1,6 +1,6 @@ -import { loadFixture, readXML } from './test-utils.js'; import assert from 'node:assert/strict'; import { before, describe, it } from 'node:test'; +import { loadFixture, readXML } from './test-utils.js'; describe('Trailing slash', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/integrations/tailwind/test/basic.test.js b/packages/integrations/tailwind/test/basic.test.js index 6e544eb8c7..9921202aa4 100644 --- a/packages/integrations/tailwind/test/basic.test.js +++ b/packages/integrations/tailwind/test/basic.test.js @@ -1,5 +1,5 @@ import * as assert from 'node:assert/strict'; -import { describe, it, before } from 'node:test'; +import { before, describe, it } from 'node:test'; import { loadFixture } from '../../../astro/test/test-utils.js'; describe('Basic', () => { diff --git a/packages/integrations/vercel/test/image.test.js b/packages/integrations/vercel/test/image.test.js index af99afab1a..b82ac02bfd 100644 --- a/packages/integrations/vercel/test/image.test.js +++ b/packages/integrations/vercel/test/image.test.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('Image', () => { diff --git a/packages/integrations/vercel/test/isr.test.js b/packages/integrations/vercel/test/isr.test.js index f6687e960b..644d7e1f54 100644 --- a/packages/integrations/vercel/test/isr.test.js +++ b/packages/integrations/vercel/test/isr.test.js @@ -1,6 +1,6 @@ -import { loadFixture } from './test-utils.js'; import assert from 'node:assert/strict'; import { before, describe, it } from 'node:test'; +import { loadFixture } from './test-utils.js'; describe('ISR', () => { /** @type {import('./test-utils.js').Fixture} */ diff --git a/packages/integrations/vercel/test/max-duration.test.js b/packages/integrations/vercel/test/max-duration.test.js index 188b4211df..2a7698663f 100644 --- a/packages/integrations/vercel/test/max-duration.test.js +++ b/packages/integrations/vercel/test/max-duration.test.js @@ -1,6 +1,6 @@ -import { loadFixture } from './test-utils.js'; import assert from 'node:assert/strict'; import { before, describe, it } from 'node:test'; +import { loadFixture } from './test-utils.js'; describe('maxDuration', () => { /** @type {import('./test-utils.js').Fixture} */ diff --git a/packages/integrations/vercel/test/no-output.test.js b/packages/integrations/vercel/test/no-output.test.js index 31708754be..34709804d0 100644 --- a/packages/integrations/vercel/test/no-output.test.js +++ b/packages/integrations/vercel/test/no-output.test.js @@ -1,6 +1,6 @@ -import { loadFixture } from './test-utils.js'; import assert from 'node:assert/strict'; import { before, describe, it } from 'node:test'; +import { loadFixture } from './test-utils.js'; describe('Missing output config', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/integrations/vercel/test/prerendered-error-pages.test.js b/packages/integrations/vercel/test/prerendered-error-pages.test.js index d528972ecc..5812c33647 100644 --- a/packages/integrations/vercel/test/prerendered-error-pages.test.js +++ b/packages/integrations/vercel/test/prerendered-error-pages.test.js @@ -1,6 +1,6 @@ -import { loadFixture } from './test-utils.js'; import assert from 'node:assert/strict'; import { before, describe, it } from 'node:test'; +import { loadFixture } from './test-utils.js'; describe('prerendered error pages routing', () => { /** @type {import('./test-utils.js').Fixture} */ diff --git a/packages/integrations/vercel/test/speed-insights.test.js b/packages/integrations/vercel/test/speed-insights.test.js index 7831216006..2ee9dcc3bf 100644 --- a/packages/integrations/vercel/test/speed-insights.test.js +++ b/packages/integrations/vercel/test/speed-insights.test.js @@ -1,6 +1,6 @@ -import { loadFixture } from './test-utils.js'; import assert from 'node:assert/strict'; import { before, describe, it } from 'node:test'; +import { loadFixture } from './test-utils.js'; describe('Vercel Speed Insights', () => { describe('output: server', () => { diff --git a/packages/integrations/vercel/test/split.test.js b/packages/integrations/vercel/test/split.test.js index 172c27775e..fbd61aa9bf 100644 --- a/packages/integrations/vercel/test/split.test.js +++ b/packages/integrations/vercel/test/split.test.js @@ -1,6 +1,6 @@ -import { loadFixture } from './test-utils.js'; import assert from 'node:assert/strict'; import { before, describe, it } from 'node:test'; +import { loadFixture } from './test-utils.js'; describe('build: split', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/integrations/vercel/test/static.test.js b/packages/integrations/vercel/test/static.test.js index 7547d2475a..e007862d72 100644 --- a/packages/integrations/vercel/test/static.test.js +++ b/packages/integrations/vercel/test/static.test.js @@ -1,6 +1,6 @@ -import { loadFixture } from './test-utils.js'; import assert from 'node:assert/strict'; import { before, describe, it } from 'node:test'; +import { loadFixture } from './test-utils.js'; describe('static routing', () => { /** @type {import('./test-utils.js').Fixture} */ diff --git a/packages/integrations/vercel/test/streaming.test.js b/packages/integrations/vercel/test/streaming.test.js index 3d231478d0..a0172a7e6a 100644 --- a/packages/integrations/vercel/test/streaming.test.js +++ b/packages/integrations/vercel/test/streaming.test.js @@ -1,6 +1,6 @@ -import { loadFixture } from './test-utils.js'; import assert from 'node:assert/strict'; import { before, describe, it } from 'node:test'; +import { loadFixture } from './test-utils.js'; describe('streaming', () => { /** @type {import('./test-utils.js').Fixture} */ diff --git a/packages/integrations/vercel/test/web-analytics.test.js b/packages/integrations/vercel/test/web-analytics.test.js index 6b4efaedbc..d5056d0acb 100644 --- a/packages/integrations/vercel/test/web-analytics.test.js +++ b/packages/integrations/vercel/test/web-analytics.test.js @@ -1,6 +1,6 @@ -import { loadFixture } from './test-utils.js'; import assert from 'node:assert/strict'; import { before, describe, it } from 'node:test'; +import { loadFixture } from './test-utils.js'; describe('Vercel Web Analytics', () => { describe('output: static', () => { diff --git a/packages/integrations/vue/test/app-entrypoint-css.test.js b/packages/integrations/vue/test/app-entrypoint-css.test.js index 6920083491..878aa8e486 100644 --- a/packages/integrations/vue/test/app-entrypoint-css.test.js +++ b/packages/integrations/vue/test/app-entrypoint-css.test.js @@ -1,7 +1,7 @@ -import { loadFixture } from './test-utils.js'; import * as assert from 'node:assert/strict'; -import { describe, it, before, after } from 'node:test'; +import { after, before, describe, it } from 'node:test'; import { load as cheerioLoad } from 'cheerio'; +import { loadFixture } from './test-utils.js'; describe('App Entrypoint CSS', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/integrations/vue/test/app-entrypoint.test.js b/packages/integrations/vue/test/app-entrypoint.test.js index 5c04376366..c7fa828263 100644 --- a/packages/integrations/vue/test/app-entrypoint.test.js +++ b/packages/integrations/vue/test/app-entrypoint.test.js @@ -1,8 +1,8 @@ -import { loadFixture } from './test-utils.js'; import * as assert from 'node:assert/strict'; -import { describe, it, before, after } from 'node:test'; +import { after, before, describe, it } from 'node:test'; import { load as cheerioLoad } from 'cheerio'; import { parseHTML } from 'linkedom'; +import { loadFixture } from './test-utils.js'; describe('App Entrypoint', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/integrations/vue/test/basics.test.js b/packages/integrations/vue/test/basics.test.js index 1f83e490f0..7db2deb379 100644 --- a/packages/integrations/vue/test/basics.test.js +++ b/packages/integrations/vue/test/basics.test.js @@ -1,7 +1,7 @@ -import { loadFixture } from './test-utils.js'; import * as assert from 'node:assert/strict'; -import { describe, it, before } from 'node:test'; +import { before, describe, it } from 'node:test'; import { parseHTML } from 'linkedom'; +import { loadFixture } from './test-utils.js'; describe('Basics', () => { /** @type {import('./test-utils').Fixture} */ let fixture; diff --git a/packages/markdown/remark/test/autolinking.test.js b/packages/markdown/remark/test/autolinking.test.js index 76922e7c37..966d5e3036 100644 --- a/packages/markdown/remark/test/autolinking.test.js +++ b/packages/markdown/remark/test/autolinking.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { describe, it, before } from 'node:test'; +import { before, describe, it } from 'node:test'; import { createMarkdownProcessor } from '../dist/index.js'; describe('autolinking', () => { diff --git a/packages/markdown/remark/test/browser.test.js b/packages/markdown/remark/test/browser.test.js index c3831cca15..824f6fa0be 100644 --- a/packages/markdown/remark/test/browser.test.js +++ b/packages/markdown/remark/test/browser.test.js @@ -1,6 +1,6 @@ -import esbuild from 'esbuild'; import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; +import esbuild from 'esbuild'; describe('Bundle for browsers', async () => { it('esbuild browser build should work', async () => { diff --git a/packages/markdown/remark/test/entities.test.js b/packages/markdown/remark/test/entities.test.js index 83d95f5a12..3c244c15ab 100644 --- a/packages/markdown/remark/test/entities.test.js +++ b/packages/markdown/remark/test/entities.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { describe, it, before } from 'node:test'; +import { before, describe, it } from 'node:test'; import { createMarkdownProcessor } from '../dist/index.js'; describe('entities', async () => { diff --git a/packages/markdown/remark/test/plugins.test.js b/packages/markdown/remark/test/plugins.test.js index 4afc364c87..dd0233baa4 100644 --- a/packages/markdown/remark/test/plugins.test.js +++ b/packages/markdown/remark/test/plugins.test.js @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; -import { createMarkdownProcessor } from '../dist/index.js'; import { fileURLToPath } from 'node:url'; +import { createMarkdownProcessor } from '../dist/index.js'; describe('plugins', () => { it('should be able to get file path when passing fileURL', async () => { diff --git a/packages/markdown/remark/test/remark-collect-images.test.js b/packages/markdown/remark/test/remark-collect-images.test.js index bc8c364680..cdfccf9c87 100644 --- a/packages/markdown/remark/test/remark-collect-images.test.js +++ b/packages/markdown/remark/test/remark-collect-images.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { describe, it, before } from 'node:test'; +import { before, describe, it } from 'node:test'; import { createMarkdownProcessor } from '../dist/index.js'; describe('collect images', async () => { diff --git a/packages/telemetry/test/index.test.js b/packages/telemetry/test/index.test.js index 678aa2f194..47d64198c2 100644 --- a/packages/telemetry/test/index.test.js +++ b/packages/telemetry/test/index.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { describe, it, before, after } from 'node:test'; +import { after, before, describe, it } from 'node:test'; import { AstroTelemetry } from '../dist/index.js'; function setup() { diff --git a/packages/underscore-redirects/test/astro.test.js b/packages/underscore-redirects/test/astro.test.js index 724ad97b19..1d753449b1 100644 --- a/packages/underscore-redirects/test/astro.test.js +++ b/packages/underscore-redirects/test/astro.test.js @@ -1,6 +1,6 @@ -import { createRedirectsFromAstroRoutes } from '../dist/index.js'; import * as assert from 'node:assert/strict'; import { describe, it } from 'node:test'; +import { createRedirectsFromAstroRoutes } from '../dist/index.js'; describe('Astro', () => { const serverConfig = { diff --git a/packages/underscore-redirects/test/print.test.js b/packages/underscore-redirects/test/print.test.js index 3c3d0018e8..90c790bfd3 100644 --- a/packages/underscore-redirects/test/print.test.js +++ b/packages/underscore-redirects/test/print.test.js @@ -1,6 +1,6 @@ -import { Redirects } from '../dist/index.js'; import * as assert from 'node:assert/strict'; import { describe, it } from 'node:test'; +import { Redirects } from '../dist/index.js'; describe('Printing', () => { it('Formats long lines in a pretty way', () => { diff --git a/packages/underscore-redirects/test/weight.test.js b/packages/underscore-redirects/test/weight.test.js index 576b4c340f..3428519653 100644 --- a/packages/underscore-redirects/test/weight.test.js +++ b/packages/underscore-redirects/test/weight.test.js @@ -1,6 +1,6 @@ -import { Redirects } from '../dist/index.js'; import * as assert from 'node:assert/strict'; import { describe, it } from 'node:test'; +import { Redirects } from '../dist/index.js'; describe('Weight', () => { it('Puts higher weighted definitions on top', () => { diff --git a/packages/upgrade/test/context.test.js b/packages/upgrade/test/context.test.js index 714a7b64ac..bbc887c2ae 100644 --- a/packages/upgrade/test/context.test.js +++ b/packages/upgrade/test/context.test.js @@ -1,5 +1,5 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; import { getContext } from '../dist/index.js'; describe('context', () => { diff --git a/packages/upgrade/test/install.test.js b/packages/upgrade/test/install.test.js index a2a0e5144e..4ceaa81c84 100644 --- a/packages/upgrade/test/install.test.js +++ b/packages/upgrade/test/install.test.js @@ -1,7 +1,7 @@ -import { describe, it } from 'node:test'; import * as assert from 'node:assert/strict'; -import { setup } from './utils.js'; +import { describe, it } from 'node:test'; import { install } from '../dist/index.js'; +import { setup } from './utils.js'; describe('install', () => { const fixture = setup(); diff --git a/packages/upgrade/test/verify.test.js b/packages/upgrade/test/verify.test.js index 3b9d4b3bc1..203e0fbf04 100644 --- a/packages/upgrade/test/verify.test.js +++ b/packages/upgrade/test/verify.test.js @@ -1,5 +1,5 @@ -import { describe, it, beforeEach } from 'node:test'; import * as assert from 'node:assert/strict'; +import { beforeEach, describe, it } from 'node:test'; import { collectPackageInfo } from '../dist/index.js'; describe('collectPackageInfo', () => { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a6e62986d8..f41b2321e8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,6 +14,9 @@ importers: .: dependencies: + '@biomejs/biome': + specifier: ^1.5.3 + version: 1.5.3 astro-benchmark: specifier: workspace:* version: link:benchmark @@ -5756,6 +5759,94 @@ packages: '@babel/helper-validator-identifier': 7.22.20 to-fast-properties: 2.0.0 + /@biomejs/biome@1.5.3: + resolution: {integrity: sha512-yvZCa/g3akwTaAQ7PCwPWDCkZs3Qa5ONg/fgOUT9e6wAWsPftCjLQFPXBeGxPK30yZSSpgEmRCfpGTmVbUjGgg==} + engines: {node: '>=14.*'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@biomejs/cli-darwin-arm64': 1.5.3 + '@biomejs/cli-darwin-x64': 1.5.3 + '@biomejs/cli-linux-arm64': 1.5.3 + '@biomejs/cli-linux-arm64-musl': 1.5.3 + '@biomejs/cli-linux-x64': 1.5.3 + '@biomejs/cli-linux-x64-musl': 1.5.3 + '@biomejs/cli-win32-arm64': 1.5.3 + '@biomejs/cli-win32-x64': 1.5.3 + dev: false + + /@biomejs/cli-darwin-arm64@1.5.3: + resolution: {integrity: sha512-ImU7mh1HghEDyqNmxEZBoMPr8SxekkZuYcs+gynKlNW+TALQs7swkERiBLkG9NR0K1B3/2uVzlvYowXrmlW8hw==} + engines: {node: '>=14.*'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + + /@biomejs/cli-darwin-x64@1.5.3: + resolution: {integrity: sha512-vCdASqYnlpq/swErH7FD6nrFz0czFtK4k/iLgj0/+VmZVjineFPgevOb+Sr9vz0tk0GfdQO60bSpI74zU8M9Dw==} + engines: {node: '>=14.*'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + + /@biomejs/cli-linux-arm64-musl@1.5.3: + resolution: {integrity: sha512-DYuMizUYUBYfS0IHGjDrOP1RGipqWfMGEvNEJ398zdtmCKLXaUvTimiox5dvx4X15mBK5M2m8wgWUgOP1giUpQ==} + engines: {node: '>=14.*'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@biomejs/cli-linux-arm64@1.5.3: + resolution: {integrity: sha512-cupBQv0sNF1OKqBfx7EDWMSsKwRrBUZfjXawT4s6hKV6ALq7p0QzWlxr/sDmbKMLOaLQtw2Qgu/77N9rm+f9Rg==} + engines: {node: '>=14.*'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@biomejs/cli-linux-x64-musl@1.5.3: + resolution: {integrity: sha512-UUHiAnlDqr2Y/LpvshBFhUYMWkl2/Jn+bi3U6jKuav0qWbbBKU/ByHgR4+NBxpKBYoCtWxhnmatfH1bpPIuZMw==} + engines: {node: '>=14.*'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@biomejs/cli-linux-x64@1.5.3: + resolution: {integrity: sha512-YQrSArQvcv4FYsk7Q91Yv4uuu5F8hJyORVcv3zsjCLGkjIjx2RhjYLpTL733SNL7v33GmOlZY0eFR1ko38tuUw==} + engines: {node: '>=14.*'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@biomejs/cli-win32-arm64@1.5.3: + resolution: {integrity: sha512-HxatYH7vf/kX9nrD+pDYuV2GI9GV8EFo6cfKkahAecTuZLPxryHx1WEfJthp5eNsE0+09STGkKIKjirP0ufaZA==} + engines: {node: '>=14.*'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: false + optional: true + + /@biomejs/cli-win32-x64@1.5.3: + resolution: {integrity: sha512-fMvbSouZEASU7mZH8SIJSANDm5OqsjgtVXlbUqxwed6BP7uuHRSs396Aqwh2+VoW8fwTpp6ybIUoC9FrzB0kyA==} + engines: {node: '>=14.*'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: false + optional: true + /@builder.io/partytown@0.8.1: resolution: {integrity: sha512-p4xhEtQCPe8YFJ8e7KT9RptnT+f4lvtbmXymbp1t0bLp+USkNMTxrRMNc3Dlr2w2fpxyX7uA0CyAeU3ju84O4A==} engines: {node: '>=18.0.0'}