mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-09 21:07:46 +00:00
* add prettier and eslint on root * remove eslint from now-cli * adjust root package.json * adjust eslintignore * adjust now-cli rules * remove @zeit/git-hooks in packages * adjust now-client eslint config * add lint-staged and hook on pre-commit * add pre-commit script * replace @zeit/git-hooks with husky * remove unnecessary script * fix eslint errors * trigger tests * fix fixable errors * fix fixable errors (bis) * revert two changes
33 lines
835 B
JavaScript
Vendored
33 lines
835 B
JavaScript
Vendored
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
const {
|
|
packAndDeploy,
|
|
testDeployment
|
|
} = require('../../../test/lib/deployment/test-deployment.js');
|
|
|
|
jest.setTimeout(5 * 60 * 1000);
|
|
const buildUtilsUrl = '@canary';
|
|
let builderUrl;
|
|
|
|
beforeAll(async () => {
|
|
const builderPath = path.resolve(__dirname, '..');
|
|
builderUrl = await packAndDeploy(builderPath);
|
|
console.log('builderUrl', builderUrl);
|
|
});
|
|
|
|
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(
|
|
{ builderUrl, buildUtilsUrl },
|
|
path.join(fixturesPath, fixture)
|
|
)
|
|
).resolves.toBeDefined();
|
|
});
|
|
}
|