serverless/test/unit/lib/plugins/remove.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

26 lines
638 B
JavaScript

'use strict';
const chai = require('chai');
const Remove = require('../../../../lib/plugins/remove');
const Serverless = require('../../../../lib/Serverless');
const expect = chai.expect;
describe('Remove', () => {
let remove;
let serverless;
beforeEach(() => {
serverless = new Serverless({ commands: [], options: {} });
remove = new Remove(serverless);
});
describe('#constructor()', () => {
it('should have access to the serverless instance', () => {
expect(remove.serverless).to.deep.equal(serverless);
});
it('should have commands', () => expect(remove.commands).to.be.not.empty);
});
});