Skip to content

Commit 1a37ff8

Browse files
committed
test: fix set test
1 parent cc7eb55 commit 1a37ff8

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,13 @@ describe('processInstrumentCSV', () => {
180180
});
181181

182182
it('should process a valid csv with a set', async () => {
183-
const file = new File(['subjectID,date,foo\n1,2024-01-01,SET(foo,bar)'], 'data.csv', { type: 'text/csv' });
183+
const papaString = unparse([
184+
['subjectID', 'date', 'foo'],
185+
['1', '2024-01-01', 'SET(foo,bar)']
186+
]);
187+
const file = new File([papaString], 'data.csv', { type: 'text/csv' });
184188
console.log(await processInstrumentCSV(file, mockInstrumentSet));
185-
await expect(processInstrumentCSV(file, mockInstrument)).resolves.toMatchObject({ success: true });
189+
await expect(processInstrumentCSV(file, mockInstrumentSet)).resolves.toMatchObject({ success: true });
186190
});
187191

188192
it('should process a valid csv with a record array', async () => {

0 commit comments

Comments
 (0)