mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
fixed tests and lints
This commit is contained in:
parent
b79c9060ea
commit
b5ef8bb9cd
@ -329,17 +329,13 @@ class CLI {
|
||||
}
|
||||
|
||||
getVersionNumber() {
|
||||
this.consoleLog(
|
||||
`Framework Core: ${version}\nPlugin: ${enterpriseVersion}\nSDK: ${sdkVersion}`
|
||||
);
|
||||
this.consoleLog(`Framework Core: ${version}\nPlugin: ${enterpriseVersion}\nSDK: ${sdkVersion}`);
|
||||
|
||||
const userNodeVersion = Number(process.version.split('.')[0].slice(1));
|
||||
// only show components version if user is running Node 8+
|
||||
if (userNodeVersion >= 8) {
|
||||
const { cliVersion, coreVersion } = require('@serverless/cli');
|
||||
this.consoleLog(
|
||||
`Components Core: ${coreVersion}\nComponents CLI: ${cliVersion}`
|
||||
);
|
||||
this.consoleLog(`Components Core: ${coreVersion}\nComponents CLI: ${cliVersion}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -447,10 +447,12 @@ describe('CLI', () => {
|
||||
it('should log the version numbers', () => {
|
||||
cli.getVersionNumber();
|
||||
|
||||
expect(consoleLogSpy).to.have.been.calledOnce;
|
||||
expect(consoleLogSpy).to.have.been.called.calledTwice;
|
||||
expect(consoleLogSpy.args[0][0]).to.include('Framework Core');
|
||||
expect(consoleLogSpy.args[0][0]).to.include('Plugin');
|
||||
expect(consoleLogSpy.args[0][0]).to.include('SDK');
|
||||
expect(consoleLogSpy.args[1][0]).to.include('Components Core');
|
||||
expect(consoleLogSpy.args[1][0]).to.include('Components CLI');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user