test: get tests passing
This commit is contained in:
parent
27875ae0e9
commit
797b121465
22 changed files with 58 additions and 31 deletions
3
packages/astro/src/assets/index.ts
Normal file
3
packages/astro/src/assets/index.ts
Normal file
|
@ -0,0 +1,3 @@
|
|||
export { getConfiguredImageService, getImage } from './internal.js';
|
||||
export { baseService, isLocalService } from './services/service.js';
|
||||
export { type LocalImageProps, type RemoteImageProps } from './types.js';
|
20
packages/astro/src/runtime/compiler/index.ts
Normal file
20
packages/astro/src/runtime/compiler/index.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
// NOTE: Although this entrypoint is exported, it is internal API and may change at any time.
|
||||
|
||||
export {
|
||||
Fragment,
|
||||
addAttribute,
|
||||
createAstro,
|
||||
createComponent,
|
||||
createTransitionScope,
|
||||
defineScriptVars,
|
||||
defineStyleVars,
|
||||
maybeRenderHead,
|
||||
mergeSlots,
|
||||
render,
|
||||
renderComponent,
|
||||
renderHead,
|
||||
renderSlot,
|
||||
renderTransition,
|
||||
spreadAttributes,
|
||||
unescapeHTML,
|
||||
} from '../server/index.js';
|
|
@ -12,7 +12,8 @@ import sync from '../dist/core/sync/index.js';
|
|||
import { RESOLVED_SPLIT_MODULE_ID } from '../dist/core/build/plugins/plugin-ssr.js';
|
||||
import { getVirtualModulePageNameFromPath } from '../dist/core/build/plugins/util.js';
|
||||
import { makeSplitEntryPointFileName } from '../dist/core/build/static-build.js';
|
||||
import { mergeConfig, resolveConfig } from '../dist/core/config/index.js';
|
||||
import { resolveConfig } from '../dist/core/config/config.js';
|
||||
import { mergeConfig } from "../dist/core/config/merge.js";
|
||||
import { nodeLogDestination } from '../dist/core/logger/node.js';
|
||||
|
||||
// Disable telemetry when running tests
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { resolveConfig } from 'vite';
|
||||
import { expect } from 'chai';
|
||||
import { cachedCompilation } from '../../../dist/core/compile/index.js';
|
||||
import { AggregateError } from '../../../dist/core/errors/index.js';
|
||||
import { pathToFileURL } from 'node:url';
|
||||
import { resolveConfig } from 'vite';
|
||||
import { cachedCompilation } from '../../../dist/core/compile/cache.js';
|
||||
import { AggregateError } from '../../../dist/core/errors/index.js';
|
||||
|
||||
describe('astro/src/core/compile', () => {
|
||||
describe('Invalid CSS', () => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { expect } from 'chai';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { resolveConfig } from '../../../dist/core/config/index.js';
|
||||
import { resolveConfig } from '../../../dist/core/config/config.js';
|
||||
|
||||
describe('resolveConfig', () => {
|
||||
it('resolves relative inline root correctly', async () => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { expect } from 'chai';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { flagsToAstroInlineConfig } from '../../../dist/cli/flags.js';
|
||||
import { resolveConfig } from '../../../dist/core/config/index.js';
|
||||
import { resolveConfig } from '../../../dist/core/config/config.js';
|
||||
|
||||
const cwd = fileURLToPath(new URL('../../fixtures/config-host/', import.meta.url));
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { expect } from 'chai';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { loadTSConfig, updateTSConfigForFramework } from '../../../dist/core/config/index.js';
|
||||
import { loadTSConfig, updateTSConfigForFramework } from '../../../dist/core/config/tsconfig.js';
|
||||
import * as path from 'node:path';
|
||||
import * as tsr from 'tsconfig-resolver';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { z } from '../../../zod.mjs';
|
||||
import { errorMap } from '../../../dist/content/index.js';
|
||||
import { errorMap } from '../../../dist/content/error-map.js';
|
||||
import { fixLineEndings } from '../../test-utils.js';
|
||||
import { expect } from 'chai';
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import { fileURLToPath } from 'node:url';
|
|||
import nodeFS from 'node:fs';
|
||||
import path from 'node:path';
|
||||
|
||||
import { attachContentServerListeners } from '../../../dist/content/index.js';
|
||||
import { attachContentServerListeners } from '../../../dist/content/server-listeners.js';
|
||||
import { createFs, runInContainer, triggerFSEvent } from '../test-utils.js';
|
||||
|
||||
const root = new URL('../../fixtures/alias/', import.meta.url);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { expect } from 'chai';
|
||||
import { AstroCookies } from '../../../dist/core/cookies/index.js';
|
||||
import { AstroCookies } from '../../../dist/core/cookies/cookies.js';
|
||||
import { apply as applyPolyfill } from '../../../dist/core/polyfill.js';
|
||||
|
||||
applyPolyfill();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { expect } from 'chai';
|
||||
import { AstroCookies } from '../../../dist/core/cookies/index.js';
|
||||
import { AstroCookies } from '../../../dist/core/cookies/cookies.js';
|
||||
import { apply as applyPolyfill } from '../../../dist/core/polyfill.js';
|
||||
|
||||
applyPolyfill();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { expect } from 'chai';
|
||||
import { AstroCookies } from '../../../dist/core/cookies/index.js';
|
||||
import { AstroCookies } from '../../../dist/core/cookies/cookies.js';
|
||||
import { apply as applyPolyfill } from '../../../dist/core/polyfill.js';
|
||||
|
||||
applyPolyfill();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { expect } from 'chai';
|
||||
import { AstroCookies } from '../../../dist/core/cookies/index.js';
|
||||
import { AstroCookies } from '../../../dist/core/cookies/cookies.js';
|
||||
import { apply as applyPolyfill } from '../../../dist/core/polyfill.js';
|
||||
|
||||
applyPolyfill();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { expect } from 'chai';
|
||||
import { AstroCookies } from '../../../dist/core/cookies/index.js';
|
||||
import { AstroCookies } from '../../../dist/core/cookies/cookies.js';
|
||||
import { apply as applyPolyfill } from '../../../dist/core/polyfill.js';
|
||||
|
||||
applyPolyfill();
|
||||
|
|
|
@ -3,9 +3,9 @@ import * as cheerio from 'cheerio';
|
|||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
import {
|
||||
createContainerWithAutomaticRestart,
|
||||
startContainer,
|
||||
} from '../../../dist/core/dev/index.js';
|
||||
} from '../../../dist/core/dev/container.js';
|
||||
import { createContainerWithAutomaticRestart } from '../../../dist/core/dev/restart.js';
|
||||
import { createFs, createRequestAndResponse, triggerFSEvent } from '../test-utils.js';
|
||||
|
||||
const root = new URL('../../fixtures/alias/', import.meta.url);
|
||||
|
|
|
@ -9,7 +9,8 @@ import {
|
|||
renderHead,
|
||||
Fragment,
|
||||
} from '../../../dist/runtime/server/index.js';
|
||||
import { createRenderContext, tryRenderRoute } from '../../../dist/core/render/index.js';
|
||||
import { createRenderContext } from '../../../dist/core/render/context.js';
|
||||
import { tryRenderRoute } from "../../../dist/core/render/core.js";
|
||||
import { createBasicEnvironment } from '../test-utils.js';
|
||||
import * as cheerio from 'cheerio';
|
||||
|
||||
|
|
|
@ -8,10 +8,11 @@ import {
|
|||
import { jsx } from '../../../dist/jsx-runtime/index.js';
|
||||
import {
|
||||
createRenderContext,
|
||||
tryRenderRoute,
|
||||
loadRenderer,
|
||||
} from '../../../dist/core/render/index.js';
|
||||
import { createAstroJSXComponent, renderer as jsxRenderer } from '../../../dist/jsx/index.js';
|
||||
} from '../../../dist/core/render/context.js';
|
||||
import { tryRenderRoute } from "../../../dist/core/render/core.js";
|
||||
import { loadRenderer } from '../../../dist/core/render/renderer.js';
|
||||
import { createAstroJSXComponent } from '../../../dist/jsx/component.js';
|
||||
import { default as jsxRenderer } from "../../../dist/jsx/renderer.js";
|
||||
import { createBasicEnvironment } from '../test-utils.js';
|
||||
|
||||
const createAstroModule = (AstroComponent) => ({ default: AstroComponent });
|
||||
|
|
|
@ -4,7 +4,8 @@ import {
|
|||
createRequestAndResponse,
|
||||
defaultLogger,
|
||||
} from '../test-utils.js';
|
||||
import { createRouteManifest, matchAllRoutes } from '../../../dist/core/routing/index.js';
|
||||
import { createRouteManifest } from '../../../dist/core/routing/manifest/create.js';
|
||||
import { matchAllRoutes } from '../../../dist/core/routing/match.js';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { createViteLoader } from '../../../dist/core/module-loader/vite.js';
|
||||
import { expect } from 'chai';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { expect } from 'chai';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { createContainer } from '../../../dist/core/dev/index.js';
|
||||
import { createViteLoader } from '../../../dist/core/module-loader/index.js';
|
||||
import { createContainer } from '../../../dist/core/dev/container.js';
|
||||
import { createViteLoader } from '../../../dist/core/module-loader/vite.js';
|
||||
import { createBasicSettings, defaultLogger } from '../test-utils.js';
|
||||
|
||||
const root = new URL('../../fixtures/alias/', import.meta.url);
|
||||
|
|
|
@ -4,11 +4,11 @@ import { EventEmitter } from 'node:events';
|
|||
import realFS from 'node:fs';
|
||||
import npath from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { getDefaultClientDirectives } from '../../dist/core/client-directive/index.js';
|
||||
import { getDefaultClientDirectives } from '../../dist/core/client-directive/default.js';
|
||||
import { nodeLogDestination } from '../../dist/core/logger/node.js';
|
||||
import { createEnvironment } from '../../dist/core/render/index.js';
|
||||
import { createEnvironment } from '../../dist/core/render/environment.js';
|
||||
import { RouteCache } from '../../dist/core/render/route-cache.js';
|
||||
import { resolveConfig } from '../../dist/core/config/index.js';
|
||||
import { resolveConfig } from '../../dist/core/config/config.js';
|
||||
import { createBaseSettings } from '../../dist/core/config/settings.js';
|
||||
import { createContainer } from '../../dist/core/dev/container.js';
|
||||
import { unixify } from './correct-path.js';
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { expect } from 'chai';
|
||||
import { createLoader } from '../../../dist/core/module-loader/index.js';
|
||||
import { createLoader } from '../../../dist/core/module-loader/loader.js';
|
||||
import {
|
||||
createController,
|
||||
runWithErrorHandling,
|
||||
} from '../../../dist/vite-plugin-astro-server/index.js';
|
||||
} from '../../../dist/vite-plugin-astro-server/controller.js';
|
||||
|
||||
describe('vite-plugin-astro-server', () => {
|
||||
describe('controller', () => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { expect } from 'chai';
|
||||
import { createLoader } from '../../../dist/core/module-loader/index.js';
|
||||
import { createRouteManifest } from '../../../dist/core/routing/index.js';
|
||||
import { createLoader } from '../../../dist/core/module-loader/loader.js';
|
||||
import { createRouteManifest } from '../../../dist/core/routing/manifest/create.js';
|
||||
import { createComponent, render } from '../../../dist/runtime/server/index.js';
|
||||
import { createController, handleRequest } from '../../../dist/vite-plugin-astro-server/index.js';
|
||||
import {
|
||||
|
|
Loading…
Reference in a new issue