Skip to content

Commit a34031f

Browse files
committed
chore: fix lint
1 parent fa4fa96 commit a34031f

File tree

3 files changed

+27
-29
lines changed

3 files changed

+27
-29
lines changed

jest.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/** @type {import('ts-jest').JestConfigWithTsJest} **/
22
module.exports = {
3-
testEnvironment: "node",
3+
testEnvironment: 'node',
44
transform: {
5-
"^.+\.tsx?$": ["ts-jest",{}],
5+
'^.+\.tsx?$': ['ts-jest', {}],
66
},
7-
};
7+
};

src/Translate.test.ts

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,31 @@
1-
import { _ } from "./Translate";
1+
import { _ } from './Translate';
22

33
describe('Translate', () => {
4-
it('_ creates a Translate', () => {
4+
it('_ creates a Translate', () => {
55
expect(_('hello')).toEqual({
6-
translate: 'hello'
6+
translate: 'hello',
77
});
8-
});
8+
});
99

10-
it('_ accepts arguments', () => {
11-
expect(_('hello', "\n", "\n\n")).toEqual({
12-
translate: 'hello',
13-
args: ["\n", "\n\n"]
14-
})
15-
});
10+
it('_ accepts arguments', () => {
11+
expect(_('hello', '\n', '\n\n')).toEqual({
12+
translate: 'hello',
13+
args: ['\n', '\n\n'],
14+
});
15+
});
1616

17-
it('_ can be nested', () => {
17+
it('_ can be nested', () => {
1818
expect(_('hello', _('arg1'), _('arg2', 'with-arg'))).toEqual({
19-
translate: 'hello',
20-
args: [
21-
{
22-
translate: 'arg1',
23-
},
24-
{
25-
translate: 'arg2',
26-
args: [
27-
'with-arg'
28-
]
29-
}
30-
]
19+
translate: 'hello',
20+
args: [
21+
{
22+
translate: 'arg1',
23+
},
24+
{
25+
translate: 'arg2',
26+
args: ['with-arg'],
27+
},
28+
],
3129
});
32-
});
33-
});
30+
});
31+
});

src/Translate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ import { TextContent, Translate } from './Primitives';
22

33
export const _ = (value: string, ...args: Array<TextContent>): Translate => ({
44
translate: value,
5-
args: args.length > 0 ? args: undefined,
5+
args: args.length > 0 ? args : undefined,
66
});

0 commit comments

Comments
 (0)