mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
34 lines
776 B
JavaScript
34 lines
776 B
JavaScript
'use strict';
|
|
|
|
const expect = require('chai').expect;
|
|
const Package = require('./package');
|
|
const Serverless = require('../../../lib/Serverless');
|
|
|
|
describe('Package', () => {
|
|
describe('#constructor()', () => {
|
|
let serverless;
|
|
let options;
|
|
let pkg;
|
|
|
|
beforeEach(() => {
|
|
serverless = new Serverless();
|
|
serverless.init();
|
|
options = {
|
|
stage: 'dev',
|
|
region: 'us-east-1',
|
|
};
|
|
pkg = new Package(serverless, options);
|
|
});
|
|
|
|
it('should set the serverless instance', () => {
|
|
expect(pkg.serverless).to.equal(serverless);
|
|
});
|
|
|
|
it('should set the options', () => {
|
|
expect(pkg.options).to.equal(options);
|
|
});
|
|
|
|
it('should have commands', () => expect(pkg.commands).to.be.not.empty);
|
|
});
|
|
});
|