2022-04-19 10:22:15 -05:00
|
|
|
// @ts-check
|
|
|
|
import { fileURLToPath } from 'url';
|
|
|
|
|
|
|
|
export * from '../../../../astro/test/test-utils.js';
|
|
|
|
|
|
|
|
/**
|
2022-04-19 10:23:07 -05:00
|
|
|
*
|
2022-04-19 10:22:15 -05:00
|
|
|
* @returns {import('../../../../astro/dist/types/@types/astro').AstroIntegration}
|
|
|
|
*/
|
|
|
|
export function testIntegration() {
|
|
|
|
return {
|
|
|
|
name: '@astrojs/netlify/test-integration',
|
|
|
|
hooks: {
|
2022-04-19 10:23:07 -05:00
|
|
|
'astro:config:setup': ({ updateConfig }) => {
|
2022-04-19 10:22:15 -05:00
|
|
|
updateConfig({
|
|
|
|
vite: {
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
'@astrojs/netlify/netlify-functions.js': fileURLToPath(
|
|
|
|
new URL('../../dist/netlify-functions.js', import.meta.url)
|
|
|
|
),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
2022-04-19 10:23:07 -05:00
|
|
|
},
|
|
|
|
},
|
2022-04-19 10:22:15 -05:00
|
|
|
};
|
|
|
|
}
|