mirror of
https://github.com/serverless/serverless.git
synced 2025-12-08 19:46:03 +00:00
33 lines
705 B
JavaScript
33 lines
705 B
JavaScript
'use strict';
|
|
|
|
class Tests {
|
|
constructor() {
|
|
this.commands = {
|
|
test: {
|
|
commands: {
|
|
integration: {
|
|
usage: 'Command for integration testing.',
|
|
lifecycleEvents: [
|
|
'logCommandsOnConsole',
|
|
],
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
this.hooks = {
|
|
'test:integration:logCommandsOnConsole': this.logCommandsOnConsole.bind(this),
|
|
};
|
|
}
|
|
|
|
logCommandsOnConsole() {
|
|
const output = this.commands;
|
|
|
|
// Note: This console.log is necessary so that the integration for
|
|
// the CLI can read and parse the console output
|
|
console.log(JSON.stringify(output)); // eslint-disable-line
|
|
}
|
|
}
|
|
|
|
module.exports = Tests;
|