mirror of
https://github.com/serverless/serverless.git
synced 2025-12-08 19:46:03 +00:00
27 lines
718 B
JavaScript
27 lines
718 B
JavaScript
'use strict';
|
|
|
|
const path = require('path');
|
|
const chai = require('chai');
|
|
const { existsSync } = require('fs-extra');
|
|
const installTemplate = require('./createFromTemplate');
|
|
const { getTmpDirPath } = require('../../tests/utils/fs');
|
|
|
|
chai.use(require('chai-as-promised'));
|
|
|
|
const expect = chai.expect;
|
|
|
|
describe('#createFromTemplate()', () => {
|
|
let tmpDirPath;
|
|
|
|
beforeEach(() => {
|
|
tmpDirPath = getTmpDirPath();
|
|
return installTemplate('aws-nodejs', tmpDirPath);
|
|
});
|
|
|
|
it('should create from template', () =>
|
|
expect(existsSync(path.join(tmpDirPath, 'serverless.yml'))).to.be.true);
|
|
|
|
it('should handle .gitignore', () =>
|
|
expect(existsSync(path.join(tmpDirPath, '.gitignore'))).to.be.true);
|
|
});
|