Files
vercel/packages/go/test/fixtures.test.js
Nathan Rajlich 73b112b1f7 [build-utils] Add getOsRelease() and getProvidedRuntime() functions (#11370)
Adds two new helper functions that custom runtimes can utilize in order
to determine whether they should use `provided.al2` or `provided.al2023`
Lambda "runtime" value, based on the build environment.

The new `getProvidedRuntime()` helper function is being used in
`@vercel/go`, so that Go endpoints may be used when the `20.x` Node
Version project setting is used.
2024-04-02 20:30:06 -07:00

21 lines
543 B
JavaScript
Vendored

const fs = require('fs');
const path = require('path');
const {
testDeployment,
} = require('../../../test/lib/deployment/test-deployment.js');
jest.setTimeout(4 * 60 * 1000);
const fixturesPath = path.resolve(__dirname, 'fixtures');
// eslint-disable-next-line no-restricted-syntax
for (const fixture of fs.readdirSync(fixturesPath)) {
// eslint-disable-next-line no-loop-func
it(`should build ${fixture}`, async () => {
await expect(
testDeployment(path.join(fixturesPath, fixture))
).resolves.toBeDefined();
});
}