Files
vercel/test/integration/now-node/index.test.js
Luc 59e7367e03 [tests] Unify linting and autoformatting (#2914)
* 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
2019-09-04 23:22:02 +02:00

45 lines
1.0 KiB
JavaScript

const path = require('path');
const runBuildLambda = require('../../lib/run-build-lambda');
const TWO_MINUTES = 120000;
function runBuildForFolder(folder) {
return runBuildLambda(path.join(__dirname, folder));
}
it(
'Should build the airtable folder',
async () => {
const { buildResult } = await runBuildForFolder('airtable');
expect(buildResult.output['index.js']).toBeDefined();
},
TWO_MINUTES
);
it(
'Should build the aws-sdk folder',
async () => {
const { buildResult } = await runBuildForFolder('aws-sdk');
expect(buildResult.output['index.js']).toBeDefined();
},
TWO_MINUTES
);
it(
'Should build the axios folder',
async () => {
const { buildResult } = await runBuildForFolder('axios');
expect(buildResult.output['index.js']).toBeDefined();
},
TWO_MINUTES
);
it(
'Should build the mongoose folder',
async () => {
const { buildResult } = await runBuildForFolder('mongoose');
expect(buildResult.output['index.js']).toBeDefined();
},
TWO_MINUTES
);