Skip to content

Commit 335a790

Browse files
committed
fix: remove platform override
1 parent 545e370 commit 335a790

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

__tests__/vite/plugin.spec.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
const { i18nextHMRPlugin } = require('../../lib/vite/plugin');
22

3-
function initPlugin({ localesDir, localesDirs, root = '/root', platform = process.platform } = {}) {
4-
if (process.platform !== platform) {
5-
Object.defineProperty(process, 'platform', {
6-
value: platform,
7-
});
8-
}
9-
3+
function initPlugin({ localesDir, localesDirs, root = '/root' } = {}) {
104
const plugin = i18nextHMRPlugin({ localesDir, localesDirs });
115
plugin.configResolved({
126
root,
@@ -29,18 +23,10 @@ function triggerHotUpdateWith({ file }, plugin) {
2923

3024
describe('Vite - plugin', () => {
3125
let plugin;
32-
let originalPlatform;
3326
beforeEach(() => {
34-
originalPlatform = process.platform;
3527
plugin = initPlugin();
3628
});
3729

38-
afterEach(() => {
39-
Object.defineProperty(process, 'platform', {
40-
value: originalPlatform,
41-
});
42-
});
43-
4430
if (process.platform !== 'win32') {
4531
it('should support localesDir as absolute path', () => {
4632
const plugin = initPlugin({ localesDir: '/absolute/path/to/locales' });

0 commit comments

Comments
 (0)