0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

[ci] format

This commit is contained in:
matthewp 2023-01-30 20:31:49 +00:00 committed by fredkbot
parent b3e65991f7
commit 43ec7f374a
6 changed files with 17 additions and 8 deletions

View file

@ -1,9 +1,9 @@
import type { AstroConfig } from 'astro';
import MagicString from 'magic-string';
import fs from 'node:fs/promises';
import { basename, extname, join } from 'node:path';
import { basename, extname } from 'node:path';
import { Readable } from 'node:stream';
import { fileURLToPath, pathToFileURL } from 'node:url';
import { pathToFileURL } from 'node:url';
import type { Plugin, ResolvedConfig } from 'vite';
import type { IntegrationOptions } from './index.js';
import type { InputFormat } from './loaders/index.js';

View file

@ -7,7 +7,8 @@ import { join } from 'node:path';
import { loadFixture } from './test-utils.js';
const __dirname = fileURLToPath(new URL('.', import.meta.url));
const toAstroImage = (relpath) => '/@astroimage' + pathToFileURL(join(__dirname, 'fixtures/basic-image', relpath)).pathname;
const toAstroImage = (relpath) =>
'/@astroimage' + pathToFileURL(join(__dirname, 'fixtures/basic-image', relpath)).pathname;
describe('SSG images - dev', function () {
let fixture;
@ -234,7 +235,11 @@ describe('SSG images - build', function () {
});
function verifyImage(pathname, expected) {
const dist = join(fileURLToPath(new URL('.', import.meta.url)), 'fixtures/basic-image/dist', pathname);
const dist = join(
fileURLToPath(new URL('.', import.meta.url)),
'fixtures/basic-image/dist',
pathname
);
const result = sizeOf(dist);
expect(result).to.deep.equal(expected);
}

View file

@ -6,7 +6,8 @@ import { loadFixture } from './test-utils.js';
import testAdapter from '../../../astro/test/test-adapter.js';
const __dirname = fileURLToPath(new URL('.', import.meta.url));
const toAstroImage = (relpath) => '/@astroimage' + pathToFileURL(join(__dirname, 'fixtures/basic-image', relpath)).pathname;
const toAstroImage = (relpath) =>
'/@astroimage' + pathToFileURL(join(__dirname, 'fixtures/basic-image', relpath)).pathname;
describe('SSR images - dev', function () {
let fixture;

View file

@ -8,7 +8,8 @@ import { join } from 'node:path';
import { loadFixture } from './test-utils.js';
const __dirname = fileURLToPath(new URL('.', import.meta.url));
const toAstroImage = (relpath) => '/@astroimage' + pathToFileURL(join(__dirname, 'fixtures/basic-picture', relpath)).pathname;
const toAstroImage = (relpath) =>
'/@astroimage' + pathToFileURL(join(__dirname, 'fixtures/basic-picture', relpath)).pathname;
describe('SSG pictures - dev', function () {
let fixture;

View file

@ -6,7 +6,8 @@ import { loadFixture } from './test-utils.js';
import testAdapter from '../../../astro/test/test-adapter.js';
const __dirname = fileURLToPath(new URL('.', import.meta.url));
const toAstroImage = (relpath) => '/@astroimage' + pathToFileURL(join(__dirname, 'fixtures/basic-picture', relpath)).pathname;
const toAstroImage = (relpath) =>
'/@astroimage' + pathToFileURL(join(__dirname, 'fixtures/basic-picture', relpath)).pathname;
describe('SSR pictures - dev', function () {
let fixture;

View file

@ -5,7 +5,8 @@ import { join } from 'node:path';
import { loadFixture } from './test-utils.js';
const __dirname = fileURLToPath(new URL('.', import.meta.url));
const toAstroImage = (relpath) => '/@astroimage' + pathToFileURL(join(__dirname, 'fixtures/squoosh-service', relpath)).pathname;
const toAstroImage = (relpath) =>
'/@astroimage' + pathToFileURL(join(__dirname, 'fixtures/squoosh-service', relpath)).pathname;
describe('Squoosh service', function () {
let fixture;