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 2022-10-04 17:01:14 +00:00 committed by fredkbot
parent a6bb2694b4
commit 67fbdc3384
4 changed files with 11 additions and 7 deletions

View file

@ -18,9 +18,11 @@ test.describe('Astro Environment BASE_URL', () => {
await page.goto(astro.resolveUrl('/blog/'));
const astroBaseUrl = page.locator('id=astro-base-url');
await expect(astroBaseUrl, 'astroBaseUrl equals to /blog/').toHaveText('/blog/')
const clientComponentBaseUrl = page.locator('id=client-component-base-url');
await expect(clientComponentBaseUrl, 'clientComponentBaseUrl equals to /blog').toHaveText('/blog/')
await expect(astroBaseUrl, 'astroBaseUrl equals to /blog/').toHaveText('/blog/');
const clientComponentBaseUrl = page.locator('id=client-component-base-url');
await expect(clientComponentBaseUrl, 'clientComponentBaseUrl equals to /blog').toHaveText(
'/blog/'
);
});
});

View file

@ -1,5 +1,5 @@
import path from 'path';
import type { TransformResult } from '@astrojs/compiler';
import path from 'path';
import type { AstroConfig } from '../../@types/astro';
import type { TransformStyle } from './types';

View file

@ -53,7 +53,9 @@ export default async function dev(
include: rendererClientEntries,
},
define: {
'import.meta.env.BASE_URL': settings.config.base ? `'${settings.config.base}'` : 'undefined',
'import.meta.env.BASE_URL': settings.config.base
? `'${settings.config.base}'`
: 'undefined',
},
},
{ settings, logging: options.logging, mode: 'dev' }

View file

@ -1,4 +1,3 @@
import npath from 'path';
import { parse as babelParser } from '@babel/parser';
import type {
ArrowFunctionExpressionKind,
@ -6,6 +5,7 @@ import type {
StringLiteralKind,
} from 'ast-types/gen/kinds';
import type { NodePath } from 'ast-types/lib/node-path';
import npath from 'path';
import { parse, print, types, visit } from 'recast';
import type { Plugin } from 'vite';
import type { AstroSettings } from '../@types/astro';