serverless/test/unit/lib/plugins/info.test.js
Piotr Grzesik 33bd501f06 feat: Error instead of warning when missing "commands" or "options"
BREAKING CHANGE: When creating `Serverless` class instance programatically,
both "options" and "commands" have to be passed via "config" to the constructor.
2022-01-27 15:21:58 +01:00

24 lines
564 B
JavaScript

'use strict';
const chai = require('chai');
const Info = require('../../../../lib/plugins/info');
const Serverless = require('../../../../lib/Serverless');
const expect = chai.expect;
chai.use(require('chai-as-promised'));
chai.use(require('sinon-chai'));
describe('Info', () => {
let info;
let serverless;
beforeEach(() => {
serverless = new Serverless({ commands: [], options: {} });
info = new Info(serverless);
});
describe('#constructor()', () => {
it('should have commands', () => expect(info.commands).to.be.not.empty);
});
});