Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/entities/v3/quarter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ test('period', () => {
})

test('propertyNames', () => {
expect(quarter.propertyNames()).toEqual(Object.keys(response['column_description']))
expect(quarter.propertyNames()).toEqual(Object.keys(response['data']))
expect(quarter.propertyNames()).not.toContain('desc_business')
})

test('labelOf', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/entities/v3/quarter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class Quarter implements HasColumnDescription, HasPeriod<YearQuarter> {
}

propertyNames(): string[] {
return Object.keys(this.columnDescription)
return Object.keys(this.data)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

なるほど keys のシードを data にした、と。

}

labelOf(propertyName: string): string | null {
Expand Down
3 changes: 1 addition & 2 deletions src/services/csv-exporter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ jest.mock('~/services/quarter-property-cache', () => jest.requireActual('~/__moc
jest.mock('~/services/company-cache', () => jest.requireActual('~/__mocks__/services/company-cache'))
jest.mock('~/services/quarter-cache', () => jest.requireActual('~/__mocks__/services/quarter-cache'))

const columnDescription = quarter['column_description']
const propertyNames = Object.keys(columnDescription)
const propertyNames = Object.keys(quarter['data'])
const fiscalYearIndex = propertyNames.indexOf('fiscal_year')
const fiscalQuarterIndex = propertyNames.indexOf('fiscal_quarter')
const segmentMemberIndex = propertyNames.indexOf('segment_member')
Expand Down