Skip to content
Snippets Groups Projects
Unverified Commit dc4d2486 authored by Kevin Aleman's avatar Kevin Aleman Committed by GitHub
Browse files

chore: Add `force` option to `rmSync` call (#33570)

parent 8c8238e8
No related branches found
No related tags found
No related merge requests found
......@@ -101,7 +101,7 @@ const languages = files.map((file) => path.basename(file, '.i18n.json'));
// write the files
if (fs.existsSync(`./dist`)) {
fs.rmSync(`./dist`, { recursive: true });
fs.rmSync(`./dist`, { recursive: true, force: true });
}
fs.mkdirSync(`./dist`, { recursive: true });
......
......@@ -10,7 +10,7 @@ describe('i18n', () => {
jest.spyOn(fs, 'writeFileSync').mockImplementation(() => {});
jest.spyOn(fs, 'readFileSync').mockImplementation(() => JSON.stringify({}));
jest.spyOn(fs, 'existsSync').mockReturnValue(true);
jest.spyOn(fs, 'rmdirSync').mockImplementation(() => {});
jest.spyOn(fs, 'rmSync').mockImplementation(() => {});
});
afterEach(() => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment