mirror of
https://github.com/serverless/serverless.git
synced 2025-12-08 19:46:03 +00:00
24 lines
596 B
JavaScript
24 lines
596 B
JavaScript
'use strict';
|
|
|
|
const expect = require('chai').expect;
|
|
const testUtils = require('./index');
|
|
|
|
describe('Test utils', () => {
|
|
describe('#getTmpDirPath()', () => {
|
|
it('should return a valid tmpDir path', () => {
|
|
const tmpDirPath = testUtils.getTmpDirPath();
|
|
|
|
expect(tmpDirPath).to.match(/.+.{16}/);
|
|
});
|
|
});
|
|
|
|
describe('#getTmpFilePath()', () => {
|
|
it('should return a valid tmpFile path', () => {
|
|
const fileName = 'foo.bar';
|
|
const tmpFilePath = testUtils.getTmpFilePath(fileName);
|
|
|
|
expect(tmpFilePath).to.match(/.+.{16}.{1}foo\.bar/);
|
|
});
|
|
});
|
|
});
|