-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Tests needed updated with detour parsing, but also caught a bug
- Loading branch information
1 parent
18605d4
commit 071dcb2
Showing
3 changed files
with
70 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,34 @@ | ||
import { Factory } from "fishery" | ||
import { | ||
GroupedSimpleDetours, | ||
SimpleDetour, | ||
SimpleDetourData, | ||
simpleDetourFromData, | ||
} from "../../src/models/detoursList" | ||
|
||
export const detourListFactory = Factory.define<GroupedSimpleDetours>(() => { | ||
return { | ||
active: [ | ||
simpleDetourFactory.build(), | ||
simpleDetourFactory.build({ direction: "Outbound" }), | ||
simpleDetourFromData(simpleDetourDataFactory.build()), | ||
simpleDetourFromData( | ||
simpleDetourDataFactory.build({ direction: "Outbound" }) | ||
), | ||
], | ||
draft: undefined, | ||
past: [simpleDetourFactory.build({ name: "Headsign Z" })], | ||
past: [ | ||
simpleDetourFromData( | ||
simpleDetourDataFactory.build({ name: "Headsign Z" }) | ||
), | ||
], | ||
} | ||
}) | ||
|
||
export const simpleDetourFactory = Factory.define<SimpleDetour>( | ||
export const simpleDetourDataFactory = Factory.define<SimpleDetourData>( | ||
({ sequence }) => ({ | ||
id: sequence, | ||
route: `${sequence}`, | ||
direction: "Inbound", | ||
name: `Headsign ${sequence}`, | ||
intersection: `Street A${sequence} & Avenue B${sequence}`, | ||
updatedAt: 1724866392, | ||
updated_at: 1724866392, | ||
}) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters