Use stub image service for tests (#7376)

This commit is contained in:
Bjorn Lu 2023-06-13 22:47:24 +08:00 committed by GitHub
parent 1c7b635956
commit 3e1fbc2c8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 39 additions and 22 deletions

View file

@ -1,15 +1,19 @@
import { defineConfig } from 'astro/config';
import react from '@astrojs/react'
import react from '@astrojs/react';
import { testImageService } from '../../test-image-service.js';
// https://astro.build/config
export default defineConfig({
// test custom base to make sure things work
base: '/custom-base',
integrations: [react()],
build: {
assetsPrefix: 'http://localhost:4321'
},
experimental: {
assets: true
}
// test custom base to make sure things work
base: '/custom-base',
integrations: [react()],
build: {
assetsPrefix: 'http://localhost:4321',
},
experimental: {
assets: true,
},
image: {
service: testImageService(),
},
});

View file

@ -1,8 +1,12 @@
import { defineConfig } from 'astro/config';
import { testImageService } from '../../test-image-service.js';
// https://astro.build/config
export default defineConfig({
experimental: {
assets: true
},
experimental: {
assets: true,
},
image: {
service: testImageService(),
},
});

View file

@ -1,10 +1,14 @@
import { defineConfig } from 'astro/config';
import markdoc from '@astrojs/markdoc';
import { testImageService } from '../../../../../astro/test/test-image-service.js';
// https://astro.build/config
export default defineConfig({
experimental: {
assets: true,
},
image: {
service: testImageService(),
},
integrations: [markdoc()],
});

View file

@ -1,8 +1,12 @@
import mdx from '@astrojs/mdx';
import { testImageService } from '../../../../../astro/test/test-image-service.js';
export default {
integrations: [mdx()],
experimental: {
assets: true
}
assets: true,
},
image: {
service: testImageService(),
},
}

View file

@ -1,9 +1,13 @@
import vercel from '@astrojs/vercel/static';
import { defineConfig } from 'astro/config';
import { testImageService } from '../../../../../astro/test/test-image-service.js';
export default defineConfig({
adapter: vercel({imageService: true}),
experimental: {
assets: true
}
assets: true,
},
image: {
service: testImageService(),
},
});

View file

@ -1,9 +1,6 @@
import vercel from '@astrojs/vercel/static';
import { defineConfig } from 'astro/config';
import vercel from '@astrojs/vercel/static';
export default defineConfig({
adapter: vercel({imageService: true}),
experimental: {
assets: true
}
adapter: vercel(),
});