Skip to content

Commit 02eb48e

Browse files
fix(packages/i18n): remove unnecessary staff from tests and add question
1 parent f85f271 commit 02eb48e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/i18n/src/__tests__/types.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { browser } from '@wxt-dev/browser';
44

55
vi.mock('@wxt-dev/browser', async () => {
66
const { vi } = await import('vitest');
7+
78
return {
89
browser: {
910
i18n: {
@@ -14,7 +15,7 @@ vi.mock('@wxt-dev/browser', async () => {
1415
});
1516
const getMessageMock = vi.mocked(browser.i18n.getMessage);
1617

17-
const n: number = 1;
18+
const n = 1;
1819

1920
describe('I18n Types', () => {
2021
beforeEach(() => {
@@ -47,6 +48,7 @@ describe('I18n Types', () => {
4748
describe('t', () => {
4849
it('should only allow passing valid combinations of arguments', () => {
4950
i18n.t('simple');
51+
// TODO: WHY THERE'S SO MUCH TS-EXPECT-ERRORS?
5052
// @ts-expect-error
5153
i18n.t('simple', []);
5254
// @ts-expect-error

packages/i18n/src/__tests__/utils.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { describe, it, expect } from 'vitest';
1+
import { describe, expect, it } from 'vitest';
22
import { ChromeMessage } from '../build';
33
import {
44
applyChromeMessagePlaceholders,
@@ -43,7 +43,7 @@ describe('Utils', () => {
4343
});
4444

4545
describe('getSubstitutionCount', () => {
46-
it('should return the last substution present in the message', () => {
46+
it('should return the last substitution present in the message', () => {
4747
expect(getSubstitutionCount('I like $1, but I like $2 better')).toBe(2);
4848
});
4949

0 commit comments

Comments
 (0)