Skip to content

Commit

Permalink
test: remove unwanted case
Browse files Browse the repository at this point in the history
  • Loading branch information
tpluscode committed Jun 6, 2024
1 parent f69845b commit f178fad
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions apis/core/test/domain/csv/file-head.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,6 @@ describe('domain/csv/file-head', () => {
expect(lines.length).to.eq(5)
})

it('trims headers', async () => {
const input = `" station_id ","\tpollutant_id\t","aggregation_id\t","\tlimitvalue"," year","value","unit_id","value_remark"\r
"blBAS","so2","annualmean",30,1984,31.9,"µg/m3","incomplete series"\r
"blBAS","so2","annualmean",30,1985,40.2,"µg/m3","incomplete series"\r
"blBAS","so2","annualmean",30,1985,40.2,"µg/m3","incomplete series"\r
"blBAS","so2","annualmean",30,1985,40.2,"µg/m3","incomplete series"\r
"blBAS","so2","annualmean",30,1986,33.6,"µg/m3","incomplete series"\r
"blBAS","so2","annualmean",30,1987,33,"µg/m3","incomplete series"`
const stream = new Readable()
stream.push(input)
stream.push(null)
const head = await loadFileHeadString(stream)

const lines = head.split('\n')
expect(lines[0]).to.eq('"station_id","pollutant_id","aggregation_id","limitvalue","year","value","unit_id","value_remark"')
expect(lines.length).to.eq(5)
})

it('parses all lines on short file', async () => {
const path = resolve(__dirname, '../../fixtures/CH_yearly_air_immission_unit_id.csv')

Expand Down

0 comments on commit f178fad

Please sign in to comment.