-
-
Notifications
You must be signed in to change notification settings - Fork 138
Feat/graphql challenge map readme/tests update #578
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
Open
CarlyAThomas
wants to merge
9
commits into
freeCodeCamp:main
Choose a base branch
from
CarlyAThomas:feat/graphql-challenge-map-readme/tests-update
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8b53352
feat: add GraphQL challenge map builder and utilities
CarlyAThomas f66891d
chore: remove redundant test-challenge-map.js
CarlyAThomas d64e363
chore: scope tests — keep challenge-map tests in this branch; move FC…
CarlyAThomas 35689e7
test: update challenge map tests and docs
CarlyAThomas 337f2d9
test: fail real-map suite when missing map
CarlyAThomas cc5effe
test: adjust missing-map assertion output
CarlyAThomas f179c99
test: fix missing map assertion
CarlyAThomas 4a2ae7b
test: skip real-map suite in CI without map
CarlyAThomas 0f4bbca
refactor: extract canonical helper, remove dead fallback, expand docs…
CarlyAThomas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,28 @@ | ||
| /** | ||
| * Resolve the canonical (certification, block) location for a single challenge | ||
| * map entry. | ||
| * | ||
| * A challenge can be reused across several superblocks and blocks in the | ||
| * freeCodeCamp curriculum (for example, a challenge that exists in both the | ||
| * current `responsive-web-design` superblock and the legacy | ||
| * `responsive-web-design-22` one). The challenge map therefore records *every* | ||
| * association as arrays — `superblocks` and `blocks` — ordered as they are | ||
| * emitted by the GraphQL build (`scripts/build-challenge-map-graphql.mjs`). | ||
| * | ||
| * For dashboard grouping we collapse each challenge down to a single location | ||
| * by taking the first element of each array as canonical. Centralizing that | ||
| * choice here keeps the "first occurrence wins" rule in one place so callers | ||
| * (and tests) cannot drift apart. | ||
| * | ||
| * @param {{ superblocks?: string[], blocks?: string[] }} mapEntry - A single | ||
| * entry from `data/challengeMap.json`. | ||
| * @returns {{ certification: string | undefined, block: string | undefined }} | ||
| * The canonical superblock (as `certification`) and block. Either field is | ||
| * `undefined` when the corresponding array is missing or empty. | ||
| */ | ||
| export function getCanonicalChallengeMapLocation(mapEntry) { | ||
| return { | ||
| certification: (mapEntry.superblocks || [])[0], | ||
| block: (mapEntry.blocks || [])[0] | ||
| }; | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can you add some explanation about the purpose of the Challenge Map? Why does does Classroom App need it? How is it consumed/transformed?
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 added additional notation in the readme about the purpose of the Challenge Map and how it works so that the functionality is not lost going forward as well as specifics in the file itself and the Utils file explaining how the breakdown works so that if anyone addresses the functions in the future they have context.