Skip to content

Commit

Permalink
refactor: Explicitly export stopDataFactory (#2754)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshlarson authored Aug 28, 2024
1 parent 5eb0fa2 commit 5fad372
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion assets/tests/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import locationSearchResultDataFactory from "./factories/locationSearchResultDat
import locationSearchResultFactory from "./factories/locationSearchResult"
import locationSearchSuggestionDataFactory from "./factories/locationSearchSuggestionData"
import locationSearchSuggestionFactory from "./factories/locationSearchSuggestion"
import stopDataFactory from "./factories/stopData"
import { stopDataFactory } from "./factories/stopData"
import { shapePointFactory } from "./factories/shapePointFactory"
import { ok, fetchError } from "../src/util/fetchResult"
import { directionsFactory } from "./factories/detourShapeFactory"
Expand Down
2 changes: 1 addition & 1 deletion assets/tests/factories/shape_data.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Factory } from "fishery"
import { ShapeData } from "../../src/models/shapeData"
import stopDataFactory from "./stopData"
import { stopDataFactory } from "./stopData"

export default Factory.define<ShapeData>(({ sequence }) => ({
id: `shape${sequence}`,
Expand Down
4 changes: 1 addition & 3 deletions assets/tests/factories/stopData.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { Factory } from "fishery"
import { StopData } from "../../src/models/stopData"

const stopDataFactory = Factory.define<StopData>(({ sequence }) => ({
export const stopDataFactory = Factory.define<StopData>(({ sequence }) => ({
id: `stop${sequence}`,
name: `Some Stop - ${sequence}`,
location_type: "stop",
lat: 0,
lon: 0,
routes: [],
}))

export default stopDataFactory
2 changes: 1 addition & 1 deletion assets/tests/models/shapeData.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from "../../src/models/shapeData"
import shapeDataFactory from "../factories/shape_data"
import shapeFactory from "../factories/shape"
import stopDataFactory from "../factories/stopData"
import { stopDataFactory } from "../factories/stopData"
import { stopsFromData } from "../../src/models/stopData"

describe("shapeFromData", () => {
Expand Down
2 changes: 1 addition & 1 deletion assets/tests/models/stopData.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
StopData,
stopsFromData,
} from "../../src/models/stopData"
import stopDataFactory from "../factories/stopData"
import { stopDataFactory } from "../factories/stopData"

describe("stopsFromData", () => {
test("transforms list of stopData to stops", () => {
Expand Down

0 comments on commit 5fad372

Please sign in to comment.