mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
26 lines
885 B
JavaScript
26 lines
885 B
JavaScript
'use strict';
|
|
|
|
const path = require('path');
|
|
const expect = require('chai').expect;
|
|
const execSync = require('child_process').execSync;
|
|
|
|
const Utils = require('../../../utils/index');
|
|
|
|
describe('General: Local plugins test', () => {
|
|
beforeAll(() => {
|
|
Utils.createTestService('aws-nodejs', path.join(__dirname, 'service'));
|
|
});
|
|
|
|
it('should successfully run the one command', () => {
|
|
const pluginExecution = execSync(`${Utils.serverlessExec} one`);
|
|
const result = new Buffer(pluginExecution, 'base64').toString();
|
|
expect(/plugin one ran successfully/g.test(result)).to.equal(true);
|
|
});
|
|
|
|
it('should successfully run the two command', () => {
|
|
const pluginExecution = execSync(`${Utils.serverlessExec} two`);
|
|
const result = new Buffer(pluginExecution, 'base64').toString();
|
|
expect(/plugin two ran successfully/g.test(result)).to.equal(true);
|
|
});
|
|
});
|