-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from GovTechSG/MOL-13533
add regadd option for mock params
- Loading branch information
Showing
10 changed files
with
295 additions
and
86 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,6 +1,7 @@ | ||
import * as factory from "./factory/person-basic-factory"; | ||
export { factory }; | ||
export { FakeMyInfoHelper as Helper, IFakeMyInfoHelper as IHelper, MockParams } from "./fake-helper"; | ||
export { FakeMyInfoHelper as Helper, IFakeMyInfoHelper as IHelper } from "./fake-helper"; | ||
export { FakeMyInfoRequest as Request } from "./fake-request"; | ||
export * from "./profiles/fake-profiles"; | ||
export { ProfileArchetype } from "./profiles/fake-profile"; | ||
export { MockParams } from "./types"; |
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
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import * as _ from "lodash"; | ||
import { FakeProfile, ProfileArchetype } from "./fake-profile"; | ||
import { mrSGDaddyPerfect } from "./mrSGDaddyPerfect"; | ||
|
||
const id = "S8752571F"; | ||
const name = ProfileArchetype.MR_SG_FROM_BEDOK; | ||
|
||
export const mrSGFromBedok: FakeProfile = { | ||
id, | ||
name, | ||
generate: (profileName) => { | ||
profileName = _.isEmpty(profileName) ? name : profileName; | ||
|
||
const profile = mrSGDaddyPerfect.generate(profileName); | ||
profile.regadd = { | ||
...profile.regadd, | ||
block: { value: "634" }, | ||
street: { value: "BEDOK STREET" }, | ||
postal: { value: "458634" } | ||
}; | ||
profile.dob = { | ||
"lastupdated": "2018-06-01", | ||
"source": "1", | ||
"classification": "C", | ||
"value": "1983-10-06", | ||
}; | ||
|
||
return profile; | ||
}, | ||
}; |
Oops, something went wrong.