test: When testing plugins load only tested plugin

This commit is contained in:
Mariusz Nowak 2021-07-01 13:04:34 +02:00 committed by Mariusz Nowak
parent a7b9a2556c
commit 151e98f585
2 changed files with 5 additions and 4 deletions

View File

@ -18,6 +18,3 @@ functions:
- http:
path: foo
method: POST
plugins:
- serverless-offline

View File

@ -11,11 +11,15 @@ describe('test/integration/curated-plugins.test.js', function () {
this.timeout(1000 * 60 * 10); // Involves time-taking npm install
let serviceDir;
let updateConfig;
before(async () => {
serviceDir = (await fixturesEngine.setup('curated-plugins')).servicePath;
({ servicePath: serviceDir, updateConfig } = await fixturesEngine.setup('curated-plugins'));
});
afterEach(async () => updateConfig({ plugins: null }));
it('should be extended by "serverless-offline"', async () => {
await updateConfig({ plugins: ['serverless-offline'] });
const slsProcessPromise = spawn(serverlessExec, ['offline'], {
cwd: serviceDir,
});