mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-08 04:22:09 +00:00
[tests] Add tests for examples (#9403)
These tests will run if one of the conditions is met: - any change to `./examples` - any changes to `./packages/frameworks` The test ensures that examples can build and deploy without errors. In a future PR, we could improve these tests to make requests to the test deployment (like we do for probes).
This commit is contained in:
7
examples/__tests__/test-utils.ts
Normal file
7
examples/__tests__/test-utils.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { basename, join } from 'path';
|
||||
import { testDeployment } from '../../test/lib/deployment/test-deployment.js';
|
||||
|
||||
export async function deployExample(filename: string) {
|
||||
const example = basename(filename).replace(/\.test\.ts$/, '');
|
||||
await testDeployment(join(filename, '..', '..', '..', example));
|
||||
}
|
||||
Reference in New Issue
Block a user