-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(pageservice): add tests for page service #588
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Briefly looked through the test cases, seems ok to me.
// Arrange | ||
const expected = ok({ | ||
name: HOMEPAGE_NAME, | ||
kind: "Homepage", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this concerns mainly the original PR, but should we change this to use an enum instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually i ran into troubles with using enums as types in the past and hence, i didn't use it here. i think the original PR has a comment about this raised by kishore also
src/services/fileServices/MdPageServices/__tests__/PageService.spec.ts
Outdated
Show resolved
Hide resolved
bade19e
to
921691f
Compare
98779bb
to
eb23deb
Compare
eb23deb
to
5dd5229
Compare
8a71f97
to
42be4e6
Compare
42be4e6
to
07701ac
Compare
Problem
previously,
PageService
had no associated tests; this PR add the tests in.Solution
pageService
parsePageName
together withretrieveStagingPermalink
; the invariants that we want to guarantee will be briefly outlined below/
will not have a name property - consistent w/ how directories behave; we could extend our model to also parse directories but this is not done at present. this should also not be possible if we are receiving from the fe