Skip to content

Commit d371da7

Browse files
test(i18n): getlanguage
1 parent a7cabef commit d371da7

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/core/i18n/utils.test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { storage } from '../storage';
2+
import { getLanguage } from './utils';
3+
4+
jest.mock('../storage', () => ({
5+
storage: {
6+
getString: jest.fn(),
7+
},
8+
}));
9+
10+
describe('getLanguage', () => {
11+
it('should call storage.getString with LOCAL', () => {
12+
getLanguage();
13+
expect(storage.getString).toHaveBeenCalledWith('local');
14+
});
15+
});

0 commit comments

Comments
 (0)