mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix: order entries in available-superblocks.json (#46274)
This commit is contained in:
committed by
GitHub
parent
3d143b6aaa
commit
b0ecd766e0
@@ -23,22 +23,21 @@ interface Block {
|
||||
meta: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export const superBlockMobileAppOrder = {
|
||||
'responsive-web-design': { public: true },
|
||||
'2022/responsive-web-design': { public: false },
|
||||
'javascript-algorithms-and-data-structures': { public: true },
|
||||
'2022/javascript-algorithms-and-data-structures': { public: false },
|
||||
'front-end-development-libraries': { public: false },
|
||||
'data-visualization': { public: false },
|
||||
'back-end-development-and-apis': { public: false },
|
||||
'quality-assurance': { public: false },
|
||||
'scientific-computing-with-python': { public: false },
|
||||
'data-analysis-with-python': { public: false },
|
||||
'information-security': { public: false },
|
||||
'machine-learning-with-python': { public: false },
|
||||
'coding-interview-prep': { public: false },
|
||||
'relational-database': { public: false }
|
||||
};
|
||||
export const superBlockMobileAppOrder = [
|
||||
{ dashedName: '2022/responsive-web-design', public: false },
|
||||
{ dashedName: 'responsive-web-design', public: true },
|
||||
{ dashedName: 'javascript-algorithms-and-data-structures', public: true },
|
||||
{ dashedName: 'front-end-development-libraries', public: false },
|
||||
{ dashedName: 'data-visualization', public: false },
|
||||
{ dashedName: 'back-end-development-and-apis', public: false },
|
||||
{ dashedName: 'quality-assurance', public: false },
|
||||
{ dashedName: 'scientific-computing-with-python', public: false },
|
||||
{ dashedName: 'data-analysis-with-python', public: false },
|
||||
{ dashedName: 'information-security', public: false },
|
||||
{ dashedName: 'machine-learning-with-python', public: false },
|
||||
{ dashedName: 'coding-interview-prep', public: false },
|
||||
{ dashedName: 'relational-database', public: false }
|
||||
];
|
||||
|
||||
export function buildExtCurriculumData(
|
||||
ver: string,
|
||||
|
||||
@@ -57,11 +57,20 @@ if (envData.clientLocale == 'english' && !envData.showUpcomingChanges) {
|
||||
});
|
||||
|
||||
test('All SuperBlocks should be present in the mobile SuperBlock object', () => {
|
||||
expect(Object.keys(superBlockMobileAppOrder)).toEqual(
|
||||
expect.arrayContaining(Object.values(SuperBlocks))
|
||||
const dashedNames = superBlockMobileAppOrder.map(
|
||||
({ dashedName }) => dashedName
|
||||
);
|
||||
// TODO: this is a hack, we should have a single source of truth for the
|
||||
// list of superblocks that are available.
|
||||
const publicSuperBlockNames = Object.values(SuperBlocks).filter(
|
||||
x => x !== '2022/javascript-algorithms-and-data-structures'
|
||||
);
|
||||
|
||||
expect(dashedNames).toEqual(
|
||||
expect.arrayContaining(publicSuperBlockNames)
|
||||
);
|
||||
expect(Object.keys(superBlockMobileAppOrder)).toHaveLength(
|
||||
Object.values(SuperBlocks).length
|
||||
publicSuperBlockNames.length
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user