Skip to content

Commit 4225391

Browse files
committed
fix: formatting
1 parent 4adc67c commit 4225391

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

apps/web/src/utils/__tests__/upload.test.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ describe('Zod3', () => {
3434
});
3535

3636
it('should parse array of objects', () => {
37-
const result = Zod3.getZodTypeName(z3.array(z3.object({ name: z3.string(), age: z3.number() })));
37+
const result = Zod3.getZodTypeName(z3.array(z3.object({ age: z3.number(), name: z3.string() })));
3838
expect(result).toMatchObject({
3939
isOptional: false,
4040
multiKeys: ['name', 'age'],
@@ -58,8 +58,8 @@ describe('Zod3', () => {
5858
describe('processInstrumentCSV', () => {
5959
const mockInstrument = {
6060
validationSchema: z3.object({
61-
score: z3.number(),
62-
notes: z3.string()
61+
notes: z3.string(),
62+
score: z3.number()
6363
})
6464
} as unknown as AnyUnilingualFormInstrument;
6565

@@ -74,9 +74,9 @@ describe('Zod3', () => {
7474

7575
expect(result).toHaveLength(1);
7676
expect(result[0]).toMatchObject({
77-
subjectID: 'subject1',
77+
notes: 'Good performance',
7878
score: 85,
79-
notes: 'Good performance'
79+
subjectID: 'subject1'
8080
});
8181
});
8282

@@ -89,8 +89,8 @@ describe('Zod3', () => {
8989
it('should handle optional fields', async () => {
9090
const instrumentWithOptional = {
9191
validationSchema: z3.object({
92-
required: z3.string(),
93-
optional: z3.string().optional()
92+
optional: z3.string().optional(),
93+
required: z3.string()
9494
})
9595
} as unknown as AnyUnilingualFormInstrument;
9696

@@ -104,8 +104,8 @@ describe('Zod3', () => {
104104

105105
expect(result).toHaveLength(1);
106106
expect(result[0]).toMatchObject({
107-
required: 'value',
108-
optional: undefined
107+
optional: undefined,
108+
required: 'value'
109109
});
110110
});
111111

@@ -197,8 +197,8 @@ describe('Zod4', () => {
197197
describe('processInstrumentCSV', () => {
198198
const mockInstrument = {
199199
validationSchema: z4.object({
200-
score: z4.number(),
201-
feedback: z4.string()
200+
feedback: z4.string(),
201+
score: z4.number()
202202
})
203203
} as unknown as AnyUnilingualFormInstrument;
204204

@@ -213,9 +213,9 @@ describe('Zod4', () => {
213213

214214
expect(result).toHaveLength(1);
215215
expect(result[0]).toMatchObject({
216-
subjectID: 'subject1',
216+
feedback: 'Excellent work',
217217
score: 92,
218-
feedback: 'Excellent work'
218+
subjectID: 'subject1'
219219
});
220220
});
221221

0 commit comments

Comments
 (0)