mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
20 lines
540 B
JavaScript
20 lines
540 B
JavaScript
'use strict';
|
|
|
|
const path = require('path');
|
|
const expect = require('chai').expect;
|
|
const fileExistsSync = require('./fileExistsSync');
|
|
|
|
describe('#fileExistsSync()', () => {
|
|
describe('When reading a file', () => {
|
|
it('should detect if a file exists', () => {
|
|
const file = fileExistsSync(__filename);
|
|
expect(file).to.equal(true);
|
|
});
|
|
|
|
it("should detect if a file doesn't exist", () => {
|
|
const noFile = fileExistsSync(path.join(__dirname, 'XYZ.json'));
|
|
expect(noFile).to.equal(false);
|
|
});
|
|
});
|
|
});
|