mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
refactor: Remove irrelevant fs modules
This commit is contained in:
parent
44d398694f
commit
c1907a2dde
@ -1,9 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const fse = require('fs-extra');
|
||||
|
||||
function removeFile(filePath) {
|
||||
return fse.remove(filePath);
|
||||
}
|
||||
|
||||
module.exports = removeFile;
|
||||
@ -1,9 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const fse = require('fs-extra');
|
||||
|
||||
function removeFileSync(filePath) {
|
||||
return fse.removeSync(filePath);
|
||||
}
|
||||
|
||||
module.exports = removeFileSync;
|
||||
@ -2,17 +2,17 @@
|
||||
|
||||
const expect = require('chai').expect;
|
||||
const fs = require('fs');
|
||||
const fse = require('fs-extra');
|
||||
const path = require('path');
|
||||
const copyDirContentsSync = require('../../../../../lib/utils/fs/copyDirContentsSync');
|
||||
const fileExistsSync = require('../../../../../lib/utils/fs/fileExistsSync');
|
||||
const removeFileSync = require('../../../../../lib/utils/fs/removeFileSync');
|
||||
const writeFileSync = require('../../../../../lib/utils/fs/writeFileSync');
|
||||
const skipOnDisabledSymlinksInWindows = require('@serverless/test/skip-on-disabled-symlinks-in-windows');
|
||||
|
||||
describe('#copyDirContentsSync()', () => {
|
||||
const afterCallback = () => {
|
||||
removeFileSync(path.join(process.cwd(), 'testSrc'));
|
||||
removeFileSync(path.join(process.cwd(), 'testDest'));
|
||||
fse.removeSync(path.join(process.cwd(), 'testSrc'));
|
||||
fse.removeSync(path.join(process.cwd(), 'testDest'));
|
||||
};
|
||||
afterEach(afterCallback);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user