From 78d135d0626c45258fb914fdf4664c2e8dcd748b Mon Sep 17 00:00:00 2001 From: Harry Sun Date: Mon, 30 Jan 2023 18:05:15 -0500 Subject: [PATCH 01/17] create editExerciseComment mutation and update some snapshots for tests --- .../__snapshots__/curriculum.test.js.snap | 4 +- .../__snapshots__/forgotpassword.test.js.snap | 4 +- .../admin/__snapshots__/users.test.js.snap | 8 +- .../__snapshots__/[lessonSlug].test.js.snap | 8 +- .../__snapshots__/username.test.js.snap | 12 +- .../__snapshots__/[lesson].test.js.snap | 6 +- graphql/index.tsx | 213 +++++++++++++----- graphql/queries/editExerciseComment.ts | 11 + graphql/resolvers.ts | 4 +- graphql/resolvers/exerciseCommentCrud.test.js | 65 +++++- graphql/resolvers/exerciseCommentCrud.ts | 26 +++ graphql/typeDefs.ts | 1 + 12 files changed, 288 insertions(+), 74 deletions(-) create mode 100644 graphql/queries/editExerciseComment.ts diff --git a/__tests__/pages/__snapshots__/curriculum.test.js.snap b/__tests__/pages/__snapshots__/curriculum.test.js.snap index 36e369af5..0147b51b1 100644 --- a/__tests__/pages/__snapshots__/curriculum.test.js.snap +++ b/__tests__/pages/__snapshots__/curriculum.test.js.snap @@ -102,7 +102,7 @@ exports[`Curriculum Page Should render with basic dummy data 1`] = ` width="16" > @@ -1795,7 +1795,7 @@ exports[`Curriculum Page Should render with lessonStatus data 1`] = ` width="16" > diff --git a/__tests__/pages/__snapshots__/forgotpassword.test.js.snap b/__tests__/pages/__snapshots__/forgotpassword.test.js.snap index f96e65074..e68bd7b7e 100644 --- a/__tests__/pages/__snapshots__/forgotpassword.test.js.snap +++ b/__tests__/pages/__snapshots__/forgotpassword.test.js.snap @@ -100,7 +100,7 @@ exports[`ForgotPassword Page Should render invalid user/email form on error 1`] width="16" > @@ -299,7 +299,7 @@ exports[`ForgotPassword Page Should render password reset instructions on succes width="16" > diff --git a/__tests__/pages/admin/__snapshots__/users.test.js.snap b/__tests__/pages/admin/__snapshots__/users.test.js.snap index 169ed285f..c165a0367 100644 --- a/__tests__/pages/admin/__snapshots__/users.test.js.snap +++ b/__tests__/pages/admin/__snapshots__/users.test.js.snap @@ -100,7 +100,7 @@ exports[`Users test Should be able to switch search options 1`] = ` width="16" > @@ -482,7 +482,7 @@ exports[`Users test Should be able to switch search options 2`] = ` width="16" > @@ -864,7 +864,7 @@ exports[`Users test Should be able to switch search options 3`] = ` width="16" > @@ -1246,7 +1246,7 @@ exports[`Users test Should be able to switch search options 4`] = ` width="16" > diff --git a/__tests__/pages/curriculum/__snapshots__/[lessonSlug].test.js.snap b/__tests__/pages/curriculum/__snapshots__/[lessonSlug].test.js.snap index 6073a3559..1383b5a95 100644 --- a/__tests__/pages/curriculum/__snapshots__/[lessonSlug].test.js.snap +++ b/__tests__/pages/curriculum/__snapshots__/[lessonSlug].test.js.snap @@ -101,7 +101,7 @@ exports[`Lesson Page Should correctly render challenges page for students who ha width="16" > @@ -581,7 +581,7 @@ exports[`Lesson Page Should render correctly with invalid lesson route 1`] = ` width="16" > @@ -792,7 +792,7 @@ exports[`Lesson Page Should render correctly with valid lesson route 1`] = ` width="16" > @@ -1284,7 +1284,7 @@ exports[`Lesson Page Should return Bad data if alerts or lessons are missing 1`] width="16" > diff --git a/__tests__/pages/profile/__snapshots__/username.test.js.snap b/__tests__/pages/profile/__snapshots__/username.test.js.snap index 5c6b60164..f8bec2157 100644 --- a/__tests__/pages/profile/__snapshots__/username.test.js.snap +++ b/__tests__/pages/profile/__snapshots__/username.test.js.snap @@ -100,7 +100,7 @@ exports[`user profile test Should render anonymous users 1`] = ` width="16" > @@ -975,7 +975,7 @@ exports[`user profile test Should render if no stars received 1`] = ` width="16" > @@ -1855,7 +1855,7 @@ exports[`user profile test Should render nulled challenges 1`] = ` width="16" > @@ -2764,7 +2764,7 @@ exports[`user profile test Should render nulled submission lessonIds 1`] = ` width="16" > @@ -3639,7 +3639,7 @@ exports[`user profile test Should render profile 1`] = ` width="16" > @@ -4768,7 +4768,7 @@ exports[`user profile test should render discord avatar and username if user con width="16" > diff --git a/__tests__/pages/review/__snapshots__/[lesson].test.js.snap b/__tests__/pages/review/__snapshots__/[lesson].test.js.snap index 5e3fec97c..36dfafea9 100644 --- a/__tests__/pages/review/__snapshots__/[lesson].test.js.snap +++ b/__tests__/pages/review/__snapshots__/[lesson].test.js.snap @@ -100,7 +100,7 @@ exports[`Lesson Page Should render Error component if route is invalid 1`] = ` width="16" > @@ -311,7 +311,7 @@ exports[`Lesson Page Should render empty submissions 1`] = ` width="16" > @@ -571,7 +571,7 @@ exports[`Lesson Page Should render new submissions 1`] = ` width="16" > diff --git a/graphql/index.tsx b/graphql/index.tsx index 56dfa13d4..9dec5afe1 100644 --- a/graphql/index.tsx +++ b/graphql/index.tsx @@ -160,6 +160,7 @@ export type Mutation = { deleteExercise: Exercise deleteModule: Module editComment?: Maybe + editExerciseComment: ExerciseComment flagExercise?: Maybe login?: Maybe logout?: Maybe @@ -278,6 +279,11 @@ export type MutationEditCommentArgs = { id: Scalars['Int'] } +export type MutationEditExerciseCommentArgs = { + content: Scalars['String'] + id: Scalars['Int'] +} + export type MutationFlagExerciseArgs = { flagReason: Scalars['String'] id: Scalars['Int'] @@ -504,6 +510,57 @@ export type UserLesson = { userId?: Maybe } +export type LessonAndChallengeInfoFragment = { + __typename?: 'Lesson' + id: number + docUrl?: string | null + githubUrl?: string | null + videoUrl?: string | null + chatUrl?: string | null + order: number + description: string + title: string + challenges: Array<{ + __typename?: 'Challenge' + id: number + description: string + lessonId: number + title: string + order: number + }> +} + +export type SubmissionsInfoFragment = { + __typename?: 'Submission' + id: number + status: SubmissionStatus + diff?: string | null + comment?: string | null + challengeId: number + lessonId: number + createdAt?: string | null + updatedAt: string + challenge: { __typename?: 'Challenge'; title: string; description: string } + user: { __typename?: 'User'; id: number; username: string } + reviewer?: { + __typename?: 'User' + id: number + username: string + name: string + } | null + comments?: Array<{ + __typename?: 'Comment' + id: number + content: string + submissionId: number + createdAt: string + authorId: number + line?: number | null + fileName?: string | null + author?: { __typename?: 'User'; username: string; name: string } | null + }> | null +} + export type AcceptSubmissionMutationVariables = Exact<{ submissionId: Scalars['Int'] comment: Scalars['String'] @@ -805,57 +862,6 @@ export type FlagExerciseMutation = { flagExercise?: { __typename?: 'Exercise'; id: number } | null } -export type LessonAndChallengeInfoFragment = { - __typename?: 'Lesson' - id: number - docUrl?: string | null - githubUrl?: string | null - videoUrl?: string | null - chatUrl?: string | null - order: number - description: string - title: string - challenges: Array<{ - __typename?: 'Challenge' - id: number - description: string - lessonId: number - title: string - order: number - }> -} - -export type SubmissionsInfoFragment = { - __typename?: 'Submission' - id: number - status: SubmissionStatus - diff?: string | null - comment?: string | null - challengeId: number - lessonId: number - createdAt?: string | null - updatedAt: string - challenge: { __typename?: 'Challenge'; title: string; description: string } - user: { __typename?: 'User'; id: number; username: string } - reviewer?: { - __typename?: 'User' - id: number - username: string - name: string - } | null - comments?: Array<{ - __typename?: 'Comment' - id: number - content: string - submissionId: number - createdAt: string - authorId: number - line?: number | null - fileName?: string | null - author?: { __typename?: 'User'; username: string; name: string } | null - }> | null -} - export type GetAppQueryVariables = Exact<{ [key: string]: never }> export type GetAppQuery = { @@ -1543,6 +1549,20 @@ export type UserInfoQuery = { } | null } +export type EditExerciseCommentMutationVariables = Exact<{ + id: Scalars['Int'] + content: Scalars['String'] +}> + +export type EditExerciseCommentMutation = { + __typename?: 'Mutation' + editExerciseComment: { + __typename?: 'ExerciseComment' + id: number + content: string + } +} + export type WithIndex = TObject & Record export type ResolversObject = WithIndex @@ -1991,6 +2011,12 @@ export type MutationResolvers< ContextType, RequireFields > + editExerciseComment?: Resolver< + ResolversTypes['ExerciseComment'], + ParentType, + ContextType, + RequireFields + > flagExercise?: Resolver< Maybe, ParentType, @@ -6691,6 +6717,89 @@ export type UserInfoQueryResult = Apollo.QueryResult< UserInfoQuery, UserInfoQueryVariables > +export const EditExerciseCommentDocument = gql` + mutation editExerciseComment($id: Int!, $content: String!) { + editExerciseComment(id: $id, content: $content) { + id + content + } + } +` +export type EditExerciseCommentMutationFn = Apollo.MutationFunction< + EditExerciseCommentMutation, + EditExerciseCommentMutationVariables +> +export type EditExerciseCommentProps< + TChildProps = {}, + TDataName extends string = 'mutate' +> = { + [key in TDataName]: Apollo.MutationFunction< + EditExerciseCommentMutation, + EditExerciseCommentMutationVariables + > +} & TChildProps +export function withEditExerciseComment< + TProps, + TChildProps = {}, + TDataName extends string = 'mutate' +>( + operationOptions?: ApolloReactHoc.OperationOption< + TProps, + EditExerciseCommentMutation, + EditExerciseCommentMutationVariables, + EditExerciseCommentProps + > +) { + return ApolloReactHoc.withMutation< + TProps, + EditExerciseCommentMutation, + EditExerciseCommentMutationVariables, + EditExerciseCommentProps + >(EditExerciseCommentDocument, { + alias: 'editExerciseComment', + ...operationOptions + }) +} + +/** + * __useEditExerciseCommentMutation__ + * + * To run a mutation, you first call `useEditExerciseCommentMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useEditExerciseCommentMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [editExerciseCommentMutation, { data, loading, error }] = useEditExerciseCommentMutation({ + * variables: { + * id: // value for 'id' + * content: // value for 'content' + * }, + * }); + */ +export function useEditExerciseCommentMutation( + baseOptions?: Apollo.MutationHookOptions< + EditExerciseCommentMutation, + EditExerciseCommentMutationVariables + > +) { + const options = { ...defaultOptions, ...baseOptions } + return Apollo.useMutation< + EditExerciseCommentMutation, + EditExerciseCommentMutationVariables + >(EditExerciseCommentDocument, options) +} +export type EditExerciseCommentMutationHookResult = ReturnType< + typeof useEditExerciseCommentMutation +> +export type EditExerciseCommentMutationResult = + Apollo.MutationResult +export type EditExerciseCommentMutationOptions = Apollo.BaseMutationOptions< + EditExerciseCommentMutation, + EditExerciseCommentMutationVariables +> export type AlertKeySpecifier = ( | 'id' | 'text' @@ -6897,6 +7006,7 @@ export type MutationKeySpecifier = ( | 'deleteExercise' | 'deleteModule' | 'editComment' + | 'editExerciseComment' | 'flagExercise' | 'login' | 'logout' @@ -6933,6 +7043,7 @@ export type MutationFieldPolicy = { deleteExercise?: FieldPolicy | FieldReadFunction deleteModule?: FieldPolicy | FieldReadFunction editComment?: FieldPolicy | FieldReadFunction + editExerciseComment?: FieldPolicy | FieldReadFunction flagExercise?: FieldPolicy | FieldReadFunction login?: FieldPolicy | FieldReadFunction logout?: FieldPolicy | FieldReadFunction diff --git a/graphql/queries/editExerciseComment.ts b/graphql/queries/editExerciseComment.ts new file mode 100644 index 000000000..209f6a975 --- /dev/null +++ b/graphql/queries/editExerciseComment.ts @@ -0,0 +1,11 @@ +import { gql } from '@apollo/client' + +const EDIT_EXERCISE_COMMENT = gql` + mutation editExerciseComment($id: Int!, $content: String!) { + editExerciseComment(id: $id, content: $content) { + id + content + } + } +` +export default EDIT_EXERCISE_COMMENT diff --git a/graphql/resolvers.ts b/graphql/resolvers.ts index 037b665db..84b0266c3 100644 --- a/graphql/resolvers.ts +++ b/graphql/resolvers.ts @@ -48,7 +48,8 @@ import { import { getExerciseComments, addExerciseComment, - getChildComments + getChildComments, + editExerciseComment } from './resolvers/exerciseCommentCrud' import { updateUserNames, updateUserPassword } from './resolvers/userDataCrud' @@ -103,6 +104,7 @@ export default { removeExercise, unlinkDiscord, addExerciseComment, + editExerciseComment, updateUserNames, updateUserPassword } diff --git a/graphql/resolvers/exerciseCommentCrud.test.js b/graphql/resolvers/exerciseCommentCrud.test.js index d58c7f0b5..8cf76e0e1 100644 --- a/graphql/resolvers/exerciseCommentCrud.test.js +++ b/graphql/resolvers/exerciseCommentCrud.test.js @@ -2,7 +2,8 @@ import prismaMock from '../../__tests__/utils/prismaMock' import { addExerciseComment, getExerciseComments, - getChildComments + getChildComments, + editExerciseComment } from './exerciseCommentCrud' describe('addExerciseComment resolver tests', () => { @@ -126,3 +127,65 @@ describe('getChildComments resolver tests', () => { }) }) }) + +describe('editExerciseComment resolver tests', () => { + test('Should throw error if user is invalid or not loggedin', async () => { + const mockContext = { req: { user: null } } + const mockArgs = { + id: 1, + content: 'no user' + } + + await expect( + editExerciseComment(undefined, mockArgs, mockContext) + ).rejects.toEqual(new Error('User should be logged in')) + }) + + test('Should throw error if authorID does not match original post', async () => { + const mockContext = { req: { user: { id: 1 } } } + const mockArgs = { id: 2, content: 'no user match' } + const mockExerciseComment = { + id: 2, + exerciseId: 1, + authorId: 2, + parentId: 1, + content: 'there is user', + userPic: null + } + + prismaMock.exerciseComment.findUnique.mockResolvedValue(mockExerciseComment) + await expect( + editExerciseComment(undefined, mockArgs, mockContext) + ).rejects.toEqual(new Error('Comment is not by user')) + + expect(prismaMock.exerciseComment.findUnique).toBeCalledWith({ + where: { + id: 2 + } + }) + }) + + test('Should edit existing comment with matching id in prisma', async () => { + const mockContext = { req: { user: { id: 1 } } } + const mockArgs = { id: 2, content: 'new content' } + const mockExerciseComment = { + id: 2, + exerciseId: 1, + authorId: 1, + content: 'old content', + userPic: null + } + + prismaMock.exerciseComment.findUnique.mockResolvedValue(mockExerciseComment) + prismaMock.exerciseComment.update.mockResolvedValue(mockExerciseComment) + + await expect( + editExerciseComment(undefined, mockArgs, mockContext) + ).resolves.toEqual(mockExerciseComment) + + expect(prismaMock.exerciseComment.update).toBeCalledWith({ + where: { id: mockArgs.id }, + data: { content: mockArgs.content } + }) + }) +}) diff --git a/graphql/resolvers/exerciseCommentCrud.ts b/graphql/resolvers/exerciseCommentCrud.ts index bdb5537c2..069f817d7 100644 --- a/graphql/resolvers/exerciseCommentCrud.ts +++ b/graphql/resolvers/exerciseCommentCrud.ts @@ -1,5 +1,6 @@ import { MutationAddExerciseCommentArgs, + MutationEditExerciseCommentArgs, QueryGetExerciseCommentsArgs, QueryGetChildCommentsArgs } from '..' @@ -44,3 +45,28 @@ export const addExerciseComment = async ( data: { authorId, content, exerciseId, parentId, userPic } }) } + +export const editExerciseComment = async ( + _parent: void, + { id, content }: MutationEditExerciseCommentArgs, + context: Context +) => { + const authorId = context.req.user?.id + if (!authorId) throw new Error('User should be logged in') + + const exerciseComment = await prisma.exerciseComment.findUnique({ + where: { + id + } + }) + + if (exerciseComment?.authorId !== authorId) + throw new Error('Comment is not by user') + + return prisma.exerciseComment.update({ + where: { + id + }, + data: { content } + }) +} diff --git a/graphql/typeDefs.ts b/graphql/typeDefs.ts index 453106381..e20624130 100644 --- a/graphql/typeDefs.ts +++ b/graphql/typeDefs.ts @@ -103,6 +103,7 @@ export default gql` parentId: Int userPic: String ): ExerciseComment! + editExerciseComment(id: Int!, content: String!): ExerciseComment! createLesson( description: String! docUrl: String From 41e0219aeb9f5c6c9f207341f90f6960d210a94e Mon Sep 17 00:00:00 2001 From: HS-90 <77421872+HS-90@users.noreply.github.com> Date: Tue, 31 Jan 2023 14:53:32 -0500 Subject: [PATCH 02/17] Add files via upload --- .../__snapshots__/curriculum.test.js.snap | 7106 ++++++++--------- .../__snapshots__/forgotpassword.test.js.snap | 806 +- 2 files changed, 3956 insertions(+), 3956 deletions(-) diff --git a/__tests__/pages/__snapshots__/curriculum.test.js.snap b/__tests__/pages/__snapshots__/curriculum.test.js.snap index 0147b51b1..1a87280ac 100644 --- a/__tests__/pages/__snapshots__/curriculum.test.js.snap +++ b/__tests__/pages/__snapshots__/curriculum.test.js.snap @@ -1,3553 +1,3553 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Curriculum Page Should render with basic dummy data 1`] = ` -
- -
- -
-
-
-
-
-

- You're off to a great start! -

-
-
-
-
- 0 - % -
-
-
-
-
-
- - - - - - 0 - - % - - - - -
-
-
- Join us on - -

- Discord -

-
- to ask your questions. Start by setting up your development environment and then follow the lessons in the course. -
- -
-
-
-
-

- -

- js-0-cover.svg -
-
- icon-challenge - - 10 - CHALLENGES - -
-
-

- A super simple introduction to help you get started! -

-
-
- js-0-cover.svg -
- -
-
-
- icon-challenge - - 10 - CHALLENGES - -
-
-

- A super simple introduction to help you get started! -

-
-
-
- -
-
-
-

- -

- js-1-cover.svg -
-
- icon-challenge - - 12 - CHALLENGES - -
-
-

- Learn how to solve simple algorithm problems recursively with the following exercises. -

-
-
- js-1-cover.svg -
- -
-
-
- icon-challenge - - 12 - CHALLENGES - -
-
-

- Learn how to solve simple algorithm problems recursively with the following exercises. -

-
-
-
-
-
-
-

-
- -
-

- js-2-cover.svg -
-
- icon-challenge - - 11 - CHALLENGES - -
-
-

- These exercises will help you gain a better understanding of what it means for a data structure to be non-primitive. -

-
-
- js-2-cover.svg -
-
-

- - Arrays - -

-
-
-
-
- icon-challenge - - 11 - CHALLENGES - -
-
-

- These exercises will help you gain a better understanding of what it means for a data structure to be non-primitive. -

-
-
-
-
-
-
-

- -

- js-3-cover.svg -
-
- icon-challenge - - 10 - CHALLENGES - -
-
-

- These exercises will test your understanding of objects, which includes linked lists and trees -

-
-
- js-3-cover.svg -
- -
-
-
- icon-challenge - - 10 - CHALLENGES - -
-
-

- These exercises will test your understanding of objects, which includes linked lists and trees -

-
-
-
-
-
-
-

- -

- js-4-cover.svg -
-
- icon-challenge - - 7 - CHALLENGES - -
-
-

- Create challenging front-end mini-projects and build an understanding of Web Development. Covers the last fundamental JavaScript concept: (Complex Objects) -

-
-
- js-4-cover.svg -
- -
-
-
- icon-challenge - - 7 - CHALLENGES - -
-
-

- Create challenging front-end mini-projects and build an understanding of Web Development. Covers the last fundamental JavaScript concept: (Complex Objects) -

-
-
-
-
-
-
-

- -

- js-5-cover.svg -
-
- icon-challenge - - 9 - CHALLENGES - -
-
-

- These exercises will help you build a strong understanding of how the web works. -

-
-
- js-5-cover.svg -
- -
-
-
- icon-challenge - - 9 - CHALLENGES - -
-
-

- These exercises will help you build a strong understanding of how the web works. -

-
-
-
-
-
-
-

- -

- js-6-cover.svg -
-
- icon-challenge - - 8 - CHALLENGES - -
-
-

- React and GraphQL Lessons -

-
-
- js-6-cover.svg -
- -
-
-
- icon-challenge - - 8 - CHALLENGES - -
-
-

- React and GraphQL Lessons -

-
-
-
-
-
-
-

- -

- js-7-cover.svg -
-
- icon-challenge - - 11 - CHALLENGES - -
-
-

- Problems that are commonly asked to test your JavaScript knowledge -

-
-
- js-7-cover.svg -
- -
-
-
- icon-challenge - - 11 - CHALLENGES - -
-
-

- Problems that are commonly asked to test your JavaScript knowledge -

-
-
-
-
-
-
-

-
- -
-

- js-8-cover.svg -
-
- icon-challenge - - 12 - CHALLENGES - -
-
-

- Tree problems with high difficulty -

-
-
- js-8-cover.svg -
-
-

- - Trees - -

-
-
-
-
- icon-challenge - - 12 - CHALLENGES - -
-
-

- Tree problems with high difficulty -

-
-
-
-
-
-
-

- -

- js-9-cover.svg -
-
- icon-challenge - - 5 - CHALLENGES - -
-
-

- General Algorithm from interviews -

-
-
- js-9-cover.svg -
- -
-
-
- icon-challenge - - 5 - CHALLENGES - -
-
-

- General Algorithm from interviews -

-
-
-
-
-
-
-
-
- -
- - Error fetching data... - - -
-
-
-
-
-
-
- -
- JOIN -
-
-
-
-
-

- You're off to a great start! -

-
-
-
-
- 0 - % -
-
-
-
-
-
- - - - - - 0 - - % - - - - -
-
-
- Join us on - -

- Discord -

-
- to ask your questions. Start by setting up your development environment and then follow the lessons in the course. -
- -
-
-
-
-

- General Announcements -

-
-

- Updates and Guidelines -

-

- To make space for other students on our servers, your account will be deleted after 30 days of inactivity. -

-

- Take each lesson challenge seriously and do them over and over again until you can solve them. With the exception End to End, all challenges are questions and exercises taken from real interviews. -

-

- These lessons will not only prepare you for interviews, but it will also help teach you the skills that you need to become an effective engineer. -

-

- After completing Foundations of JavaScript, Variables & Functions, Array, Objects, End to End, HTML/CSS/JavaScript, React/GraphQL/SocketIO, you will be ready to contribute to our codebase. -

-
-
-
-
-

- ADDITIONAL RESOURCES -

- -

- MDN Web Docs -

-
-

- The encyclopedia of web development -

-
- -

- The Modern JavaScript Tutorial -

-
-

- In-depth overview of javascript language -

-
- -

- The Missing Semester -

-
-

- Introduction to shell, git, vim, tmux and etc. -

-
- -

- Teach Yourself Computer Science -

-
-

- Self-study guide -

-
-
-
-
-
-
- © Copyright 2022 GarageScript -
-
-`; - -exports[`Curriculum Page Should render with lessonStatus data 1`] = ` -
- -
- -
-
-
-
-
-

- Keep up the great work! -

-
-
-
-
- 42 - % -
-
-
-
-
-
- - - - - - 42 - - % - - - - -
-
-
- Join us on - -

- Discord -

-
- to ask your questions. Start by setting up your development environment and then follow the lessons in the course. -
- -
-
-
-
-

-
- - - - - - - - COMPLETED - - -
-

- js-0-cover.svg -
-
- icon-challenge - - 10 - CHALLENGES - -
-
-

- A super simple introduction to help you get started! -

-
-
- js-0-cover.svg -
-
-

- - Foundations of JavaScript - -

- - - - - - - COMPLETED - - -
-
-
-
- icon-challenge - - 10 - CHALLENGES - -
-
-

- A super simple introduction to help you get started! -

-
-
-
-
-
-
-

-
- - - - - - - - COMPLETED - - -
-

- js-1-cover.svg -
-
- icon-challenge - - 12 - CHALLENGES - -
-
-

- Learn how to solve simple algorithm problems recursively with the following exercises. -

-
-
- js-1-cover.svg -
-
-

- - Variables & Functions - -

- - - - - - - COMPLETED - - -
-
-
-
- icon-challenge - - 12 - CHALLENGES - -
-
-

- Learn how to solve simple algorithm problems recursively with the following exercises. -

-
-
-
-
-
-
-

-
- - - - - - - - COMPLETED - - -
-

- js-2-cover.svg -
-
- icon-challenge - - 11 - CHALLENGES - -
-
-

- These exercises will help you gain a better understanding of what it means for a data structure to be non-primitive. -

-
-
- js-2-cover.svg -
-
-

- - Arrays - -

- - - - - - - COMPLETED - - -
-
-
-
- icon-challenge - - 11 - CHALLENGES - -
-
-

- These exercises will help you gain a better understanding of what it means for a data structure to be non-primitive. -

-
-
-
-
-
-
-

- -

- js-3-cover.svg -
-
- icon-challenge - - 10 - CHALLENGES - -
-
-

- These exercises will test your understanding of objects, which includes linked lists and trees -

-
-
- js-3-cover.svg -
- -
-
-
- icon-challenge - - 10 - CHALLENGES - -
-
-

- These exercises will test your understanding of objects, which includes linked lists and trees -

-
-
-
- -
-
-
-

- -

- js-4-cover.svg -
-
- icon-challenge - - 7 - CHALLENGES - -
-
-

- Create challenging front-end mini-projects and build an understanding of Web Development. Covers the last fundamental JavaScript concept: (Complex Objects) -

-
-
- js-4-cover.svg -
- -
-
-
- icon-challenge - - 7 - CHALLENGES - -
-
-

- Create challenging front-end mini-projects and build an understanding of Web Development. Covers the last fundamental JavaScript concept: (Complex Objects) -

-
-
-
-
-
-
-

- -

- js-5-cover.svg -
-
- icon-challenge - - 9 - CHALLENGES - -
-
-

- These exercises will help you build a strong understanding of how the web works. -

-
-
- js-5-cover.svg -
- -
-
-
- icon-challenge - - 9 - CHALLENGES - -
-
-

- These exercises will help you build a strong understanding of how the web works. -

-
-
-
-
-
-
-

- -

- js-6-cover.svg -
-
- icon-challenge - - 8 - CHALLENGES - -
-
-

- React and GraphQL Lessons -

-
-
- js-6-cover.svg -
- -
-
-
- icon-challenge - - 8 - CHALLENGES - -
-
-

- React and GraphQL Lessons -

-
-
-
-
-
-
-

- -

- js-7-cover.svg -
-
- icon-challenge - - 11 - CHALLENGES - -
-
-

- Problems that are commonly asked to test your JavaScript knowledge -

-
-
- js-7-cover.svg -
- -
-
-
- icon-challenge - - 11 - CHALLENGES - -
-
-

- Problems that are commonly asked to test your JavaScript knowledge -

-
-
-
-
-
-
-

-
- -
-

- js-8-cover.svg -
-
- icon-challenge - - 12 - CHALLENGES - -
-
-

- Tree problems with high difficulty -

-
-
- js-8-cover.svg -
-
-

- - Trees - -

-
-
-
-
- icon-challenge - - 12 - CHALLENGES - -
-
-

- Tree problems with high difficulty -

-
-
-
-
-
-
-

- -

- js-9-cover.svg -
-
- icon-challenge - - 5 - CHALLENGES - -
-
-

- General Algorithm from interviews -

-
-
- js-9-cover.svg -
- -
-
-
- icon-challenge - - 5 - CHALLENGES - -
-
-

- General Algorithm from interviews -

-
-
-
-
-
-
-
-
- -
- - Error fetching data... - - -
-
-
-
-
-
-
- -
- JOIN -
-
-
-
-
-

- Keep up the great work! -

-
-
-
-
- 42 - % -
-
-
-
-
-
- - - - - - 42 - - % - - - - -
-
-
- Join us on - -

- Discord -

-
- to ask your questions. Start by setting up your development environment and then follow the lessons in the course. -
- -
-
-
-
-

- General Announcements -

-
-

- Updates and Guidelines -

-

- To make space for other students on our servers, your account will be deleted after 30 days of inactivity. -

-

- Take each lesson challenge seriously and do them over and over again until you can solve them. With the exception End to End, all challenges are questions and exercises taken from real interviews. -

-

- These lessons will not only prepare you for interviews, but it will also help teach you the skills that you need to become an effective engineer. -

-

- After completing Foundations of JavaScript, Variables & Functions, Array, Objects, End to End, HTML/CSS/JavaScript, React/GraphQL/SocketIO, you will be ready to contribute to our codebase. -

-
-
-
-
-

- ADDITIONAL RESOURCES -

- -

- MDN Web Docs -

-
-

- The encyclopedia of web development -

-
- -

- The Modern JavaScript Tutorial -

-
-

- In-depth overview of javascript language -

-
- -

- The Missing Semester -

-
-

- Introduction to shell, git, vim, tmux and etc. -

-
- -

- Teach Yourself Computer Science -

-
-

- Self-study guide -

-
-
-
-
-
-
- © Copyright 2022 GarageScript -
-
-`; +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Curriculum Page Should render with basic dummy data 1`] = ` +
+ +
+ +
+
+
+
+
+

+ You're off to a great start! +

+
+
+
+
+ 0 + % +
+
+
+
+
+
+ + + + + + 0 + + % + + + + +
+
+
+ Join us on + +

+ Discord +

+
+ to ask your questions. Start by setting up your development environment and then follow the lessons in the course. +
+ +
+
+
+
+

+ +

+ js-0-cover.svg +
+
+ icon-challenge + + 10 + CHALLENGES + +
+
+

+ A super simple introduction to help you get started! +

+
+
+ js-0-cover.svg +
+ +
+
+
+ icon-challenge + + 10 + CHALLENGES + +
+
+

+ A super simple introduction to help you get started! +

+
+
+
+ +
+
+
+

+ +

+ js-1-cover.svg +
+
+ icon-challenge + + 12 + CHALLENGES + +
+
+

+ Learn how to solve simple algorithm problems recursively with the following exercises. +

+
+
+ js-1-cover.svg +
+ +
+
+
+ icon-challenge + + 12 + CHALLENGES + +
+
+

+ Learn how to solve simple algorithm problems recursively with the following exercises. +

+
+
+
+
+
+
+

+
+ +
+

+ js-2-cover.svg +
+
+ icon-challenge + + 11 + CHALLENGES + +
+
+

+ These exercises will help you gain a better understanding of what it means for a data structure to be non-primitive. +

+
+
+ js-2-cover.svg +
+
+

+ + Arrays + +

+
+
+
+
+ icon-challenge + + 11 + CHALLENGES + +
+
+

+ These exercises will help you gain a better understanding of what it means for a data structure to be non-primitive. +

+
+
+
+
+
+
+

+ +

+ js-3-cover.svg +
+
+ icon-challenge + + 10 + CHALLENGES + +
+
+

+ These exercises will test your understanding of objects, which includes linked lists and trees +

+
+
+ js-3-cover.svg +
+ +
+
+
+ icon-challenge + + 10 + CHALLENGES + +
+
+

+ These exercises will test your understanding of objects, which includes linked lists and trees +

+
+
+
+
+
+
+

+ +

+ js-4-cover.svg +
+
+ icon-challenge + + 7 + CHALLENGES + +
+
+

+ Create challenging front-end mini-projects and build an understanding of Web Development. Covers the last fundamental JavaScript concept: (Complex Objects) +

+
+
+ js-4-cover.svg +
+ +
+
+
+ icon-challenge + + 7 + CHALLENGES + +
+
+

+ Create challenging front-end mini-projects and build an understanding of Web Development. Covers the last fundamental JavaScript concept: (Complex Objects) +

+
+
+
+
+
+
+

+ +

+ js-5-cover.svg +
+
+ icon-challenge + + 9 + CHALLENGES + +
+
+

+ These exercises will help you build a strong understanding of how the web works. +

+
+
+ js-5-cover.svg +
+ +
+
+
+ icon-challenge + + 9 + CHALLENGES + +
+
+

+ These exercises will help you build a strong understanding of how the web works. +

+
+
+
+
+
+
+

+ +

+ js-6-cover.svg +
+
+ icon-challenge + + 8 + CHALLENGES + +
+
+

+ React and GraphQL Lessons +

+
+
+ js-6-cover.svg +
+ +
+
+
+ icon-challenge + + 8 + CHALLENGES + +
+
+

+ React and GraphQL Lessons +

+
+
+
+
+
+
+

+ +

+ js-7-cover.svg +
+
+ icon-challenge + + 11 + CHALLENGES + +
+
+

+ Problems that are commonly asked to test your JavaScript knowledge +

+
+
+ js-7-cover.svg +
+ +
+
+
+ icon-challenge + + 11 + CHALLENGES + +
+
+

+ Problems that are commonly asked to test your JavaScript knowledge +

+
+
+
+
+
+
+

+
+ +
+

+ js-8-cover.svg +
+
+ icon-challenge + + 12 + CHALLENGES + +
+
+

+ Tree problems with high difficulty +

+
+
+ js-8-cover.svg +
+
+

+ + Trees + +

+
+
+
+
+ icon-challenge + + 12 + CHALLENGES + +
+
+

+ Tree problems with high difficulty +

+
+
+
+
+
+
+

+ +

+ js-9-cover.svg +
+
+ icon-challenge + + 5 + CHALLENGES + +
+
+

+ General Algorithm from interviews +

+
+
+ js-9-cover.svg +
+ +
+
+
+ icon-challenge + + 5 + CHALLENGES + +
+
+

+ General Algorithm from interviews +

+
+
+
+
+
+
+
+
+ +
+ + Error fetching data... + + +
+
+
+
+
+
+
+ +
+ JOIN +
+
+
+
+
+

+ You're off to a great start! +

+
+
+
+
+ 0 + % +
+
+
+
+
+
+ + + + + + 0 + + % + + + + +
+
+
+ Join us on + +

+ Discord +

+
+ to ask your questions. Start by setting up your development environment and then follow the lessons in the course. +
+ +
+
+
+
+

+ General Announcements +

+
+

+ Updates and Guidelines +

+

+ To make space for other students on our servers, your account will be deleted after 30 days of inactivity. +

+

+ Take each lesson challenge seriously and do them over and over again until you can solve them. With the exception End to End, all challenges are questions and exercises taken from real interviews. +

+

+ These lessons will not only prepare you for interviews, but it will also help teach you the skills that you need to become an effective engineer. +

+

+ After completing Foundations of JavaScript, Variables & Functions, Array, Objects, End to End, HTML/CSS/JavaScript, React/GraphQL/SocketIO, you will be ready to contribute to our codebase. +

+
+
+
+
+

+ ADDITIONAL RESOURCES +

+ +

+ MDN Web Docs +

+
+

+ The encyclopedia of web development +

+
+ +

+ The Modern JavaScript Tutorial +

+
+

+ In-depth overview of javascript language +

+
+ +

+ The Missing Semester +

+
+

+ Introduction to shell, git, vim, tmux and etc. +

+
+ +

+ Teach Yourself Computer Science +

+
+

+ Self-study guide +

+
+
+
+
+
+
+ © Copyright 2022 GarageScript +
+
+`; + +exports[`Curriculum Page Should render with lessonStatus data 1`] = ` +
+ +
+ +
+
+
+
+
+

+ Keep up the great work! +

+
+
+
+
+ 42 + % +
+
+
+
+
+
+ + + + + + 42 + + % + + + + +
+
+
+ Join us on + +

+ Discord +

+
+ to ask your questions. Start by setting up your development environment and then follow the lessons in the course. +
+ +
+
+
+
+

+
+ + + + + + + + COMPLETED + + +
+

+ js-0-cover.svg +
+
+ icon-challenge + + 10 + CHALLENGES + +
+
+

+ A super simple introduction to help you get started! +

+
+
+ js-0-cover.svg +
+
+

+ + Foundations of JavaScript + +

+ + + + + + + COMPLETED + + +
+
+
+
+ icon-challenge + + 10 + CHALLENGES + +
+
+

+ A super simple introduction to help you get started! +

+
+
+
+
+
+
+

+
+ + + + + + + + COMPLETED + + +
+

+ js-1-cover.svg +
+
+ icon-challenge + + 12 + CHALLENGES + +
+
+

+ Learn how to solve simple algorithm problems recursively with the following exercises. +

+
+
+ js-1-cover.svg +
+
+

+ + Variables & Functions + +

+ + + + + + + COMPLETED + + +
+
+
+
+ icon-challenge + + 12 + CHALLENGES + +
+
+

+ Learn how to solve simple algorithm problems recursively with the following exercises. +

+
+
+
+
+
+
+

+
+ + + + + + + + COMPLETED + + +
+

+ js-2-cover.svg +
+
+ icon-challenge + + 11 + CHALLENGES + +
+
+

+ These exercises will help you gain a better understanding of what it means for a data structure to be non-primitive. +

+
+
+ js-2-cover.svg +
+
+

+ + Arrays + +

+ + + + + + + COMPLETED + + +
+
+
+
+ icon-challenge + + 11 + CHALLENGES + +
+
+

+ These exercises will help you gain a better understanding of what it means for a data structure to be non-primitive. +

+
+
+
+
+
+
+

+ +

+ js-3-cover.svg +
+
+ icon-challenge + + 10 + CHALLENGES + +
+
+

+ These exercises will test your understanding of objects, which includes linked lists and trees +

+
+
+ js-3-cover.svg +
+ +
+
+
+ icon-challenge + + 10 + CHALLENGES + +
+
+

+ These exercises will test your understanding of objects, which includes linked lists and trees +

+
+
+
+ +
+
+
+

+ +

+ js-4-cover.svg +
+
+ icon-challenge + + 7 + CHALLENGES + +
+
+

+ Create challenging front-end mini-projects and build an understanding of Web Development. Covers the last fundamental JavaScript concept: (Complex Objects) +

+
+
+ js-4-cover.svg +
+ +
+
+
+ icon-challenge + + 7 + CHALLENGES + +
+
+

+ Create challenging front-end mini-projects and build an understanding of Web Development. Covers the last fundamental JavaScript concept: (Complex Objects) +

+
+
+
+
+
+
+

+ +

+ js-5-cover.svg +
+
+ icon-challenge + + 9 + CHALLENGES + +
+
+

+ These exercises will help you build a strong understanding of how the web works. +

+
+
+ js-5-cover.svg +
+ +
+
+
+ icon-challenge + + 9 + CHALLENGES + +
+
+

+ These exercises will help you build a strong understanding of how the web works. +

+
+
+
+
+
+
+

+ +

+ js-6-cover.svg +
+
+ icon-challenge + + 8 + CHALLENGES + +
+
+

+ React and GraphQL Lessons +

+
+
+ js-6-cover.svg +
+ +
+
+
+ icon-challenge + + 8 + CHALLENGES + +
+
+

+ React and GraphQL Lessons +

+
+
+
+
+
+
+

+ +

+ js-7-cover.svg +
+
+ icon-challenge + + 11 + CHALLENGES + +
+
+

+ Problems that are commonly asked to test your JavaScript knowledge +

+
+
+ js-7-cover.svg +
+ +
+
+
+ icon-challenge + + 11 + CHALLENGES + +
+
+

+ Problems that are commonly asked to test your JavaScript knowledge +

+
+
+
+
+
+
+

+
+ +
+

+ js-8-cover.svg +
+
+ icon-challenge + + 12 + CHALLENGES + +
+
+

+ Tree problems with high difficulty +

+
+
+ js-8-cover.svg +
+
+

+ + Trees + +

+
+
+
+
+ icon-challenge + + 12 + CHALLENGES + +
+
+

+ Tree problems with high difficulty +

+
+
+
+
+
+
+

+ +

+ js-9-cover.svg +
+
+ icon-challenge + + 5 + CHALLENGES + +
+
+

+ General Algorithm from interviews +

+
+
+ js-9-cover.svg +
+ +
+
+
+ icon-challenge + + 5 + CHALLENGES + +
+
+

+ General Algorithm from interviews +

+
+
+
+
+
+
+
+
+ +
+ + Error fetching data... + + +
+
+
+
+
+
+
+ +
+ JOIN +
+
+
+
+
+

+ Keep up the great work! +

+
+
+
+
+ 42 + % +
+
+
+
+
+
+ + + + + + 42 + + % + + + + +
+
+
+ Join us on + +

+ Discord +

+
+ to ask your questions. Start by setting up your development environment and then follow the lessons in the course. +
+ +
+
+
+
+

+ General Announcements +

+
+

+ Updates and Guidelines +

+

+ To make space for other students on our servers, your account will be deleted after 30 days of inactivity. +

+

+ Take each lesson challenge seriously and do them over and over again until you can solve them. With the exception End to End, all challenges are questions and exercises taken from real interviews. +

+

+ These lessons will not only prepare you for interviews, but it will also help teach you the skills that you need to become an effective engineer. +

+

+ After completing Foundations of JavaScript, Variables & Functions, Array, Objects, End to End, HTML/CSS/JavaScript, React/GraphQL/SocketIO, you will be ready to contribute to our codebase. +

+
+
+
+
+

+ ADDITIONAL RESOURCES +

+ +

+ MDN Web Docs +

+
+

+ The encyclopedia of web development +

+
+ +

+ The Modern JavaScript Tutorial +

+
+

+ In-depth overview of javascript language +

+
+ +

+ The Missing Semester +

+
+

+ Introduction to shell, git, vim, tmux and etc. +

+
+ +

+ Teach Yourself Computer Science +

+
+

+ Self-study guide +

+
+
+
+
+
+
+ © Copyright 2022 GarageScript +
+
+`; \ No newline at end of file diff --git a/__tests__/pages/__snapshots__/forgotpassword.test.js.snap b/__tests__/pages/__snapshots__/forgotpassword.test.js.snap index e68bd7b7e..4c37daddf 100644 --- a/__tests__/pages/__snapshots__/forgotpassword.test.js.snap +++ b/__tests__/pages/__snapshots__/forgotpassword.test.js.snap @@ -1,403 +1,403 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`ForgotPassword Page Should render invalid user/email form on error 1`] = ` -
- -
-
-
-
-

- Username or Email does not exist -

-

- -

-
-
-
-
- © Copyright 2022 GarageScript -
-
-`; - -exports[`ForgotPassword Page Should render password reset instructions on success 1`] = ` -
- -
-
-
-
- Green circle with a checkmark inside. -

- Password reset instructions sent -

-

-

- You will receive an email containing a link to reset your password. -

-
-
-
-
-
- © Copyright 2022 GarageScript -
-
-`; +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ForgotPassword Page Should render invalid user/email form on error 1`] = ` +
+ +
+
+
+
+

+ Username or Email does not exist +

+

+ +

+
+
+
+
+ © Copyright 2022 GarageScript +
+
+`; + +exports[`ForgotPassword Page Should render password reset instructions on success 1`] = ` +
+ +
+
+
+
+ Green circle with a checkmark inside. +

+ Password reset instructions sent +

+

+

+ You will receive an email containing a link to reset your password. +

+
+
+
+
+
+ © Copyright 2022 GarageScript +
+
+`; \ No newline at end of file From 51d319b755fb00bdb8c91f9c0c0cdc3386044216 Mon Sep 17 00:00:00 2001 From: HS-90 <77421872+HS-90@users.noreply.github.com> Date: Tue, 31 Jan 2023 14:54:06 -0500 Subject: [PATCH 03/17] Add files via upload --- .../admin/__snapshots__/users.test.js.snap | 2990 ++++++++--------- 1 file changed, 1495 insertions(+), 1495 deletions(-) diff --git a/__tests__/pages/admin/__snapshots__/users.test.js.snap b/__tests__/pages/admin/__snapshots__/users.test.js.snap index c165a0367..4c879b929 100644 --- a/__tests__/pages/admin/__snapshots__/users.test.js.snap +++ b/__tests__/pages/admin/__snapshots__/users.test.js.snap @@ -1,1495 +1,1495 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Users test Should be able to switch search options 1`] = ` -
- -
-
-

- Users -

-
-
-

- -

-
- -
-
- -
-
- -
-
- -
-
-
- -
-
-

- Filter By: -

-
- -
-
- -
-
- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- ID - - Username - - Name - - Email - - Admin -
- 5 - - admin - - admin admin - - some@mail.com - - -
- 2 - - newbie - - newbie newbie - - some@mail.com - - -
-
-
-
- © Copyright 2022 GarageScript -
-
-`; - -exports[`Users test Should be able to switch search options 2`] = ` -
- -
-
-

- Users -

-
-
-

- -

-
- -
-
- -
-
- -
-
- -
-
-
- -
-
-

- Filter By: -

-
- -
-
- -
-
- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- ID - - Username - - Name - - Email - - Admin -
- 5 - - admin - - admin admin - - some@mail.com - - -
- 2 - - newbie - - newbie newbie - - some@mail.com - - -
-
-
-
- © Copyright 2022 GarageScript -
-
-`; - -exports[`Users test Should be able to switch search options 3`] = ` -
- -
-
-

- Users -

-
-
-

- -

-
- -
-
- -
-
- -
-
- -
-
-
- -
-
-

- Filter By: -

-
- -
-
- -
-
- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- ID - - Username - - Name - - Email - - Admin -
- 5 - - admin - - admin admin - - some@mail.com - - -
- 2 - - newbie - - newbie newbie - - some@mail.com - - -
-
-
-
- © Copyright 2022 GarageScript -
-
-`; - -exports[`Users test Should be able to switch search options 4`] = ` -
- -
-
-

- Users -

-
-
-

- -

-
- -
-
- -
-
- -
-
- -
-
-
- -
-
-

- Filter By: -

-
- -
-
- -
-
- -
-
-
- - - - - - - - - - - - - - - - - - - -
- ID - - Username - - Name - - Email - - Admin -
- 5 - - admin - - admin admin - - some@mail.com - - -
-
-
-
- © Copyright 2022 GarageScript -
-
-`; +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Users test Should be able to switch search options 1`] = ` +
+ +
+
+

+ Users +

+
+
+

+ +

+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+

+ Filter By: +

+
+ +
+
+ +
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ ID + + Username + + Name + + Email + + Admin +
+ 5 + + admin + + admin admin + + some@mail.com + + +
+ 2 + + newbie + + newbie newbie + + some@mail.com + + +
+
+
+
+ © Copyright 2022 GarageScript +
+
+`; + +exports[`Users test Should be able to switch search options 2`] = ` +
+ +
+
+

+ Users +

+
+
+

+ +

+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+

+ Filter By: +

+
+ +
+
+ +
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ ID + + Username + + Name + + Email + + Admin +
+ 5 + + admin + + admin admin + + some@mail.com + + +
+ 2 + + newbie + + newbie newbie + + some@mail.com + + +
+
+
+
+ © Copyright 2022 GarageScript +
+
+`; + +exports[`Users test Should be able to switch search options 3`] = ` +
+ +
+
+

+ Users +

+
+
+

+ +

+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+

+ Filter By: +

+
+ +
+
+ +
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ ID + + Username + + Name + + Email + + Admin +
+ 5 + + admin + + admin admin + + some@mail.com + + +
+ 2 + + newbie + + newbie newbie + + some@mail.com + + +
+
+
+
+ © Copyright 2022 GarageScript +
+
+`; + +exports[`Users test Should be able to switch search options 4`] = ` +
+ +
+
+

+ Users +

+
+
+

+ +

+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+

+ Filter By: +

+
+ +
+
+ +
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + +
+ ID + + Username + + Name + + Email + + Admin +
+ 5 + + admin + + admin admin + + some@mail.com + + +
+
+
+
+ © Copyright 2022 GarageScript +
+
+`; \ No newline at end of file From 6f4dabc44b0f4054bfb33d4573ec3f7c2767d4a5 Mon Sep 17 00:00:00 2001 From: HS-90 <77421872+HS-90@users.noreply.github.com> Date: Tue, 31 Jan 2023 15:00:35 -0500 Subject: [PATCH 04/17] Add files via upload --- .../__snapshots__/[lessonSlug].test.js.snap | 2790 ++++++++--------- 1 file changed, 1395 insertions(+), 1395 deletions(-) diff --git a/__tests__/pages/curriculum/__snapshots__/[lessonSlug].test.js.snap b/__tests__/pages/curriculum/__snapshots__/[lessonSlug].test.js.snap index 1383b5a95..7dd367697 100644 --- a/__tests__/pages/curriculum/__snapshots__/[lessonSlug].test.js.snap +++ b/__tests__/pages/curriculum/__snapshots__/[lessonSlug].test.js.snap @@ -1,1395 +1,1395 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Lesson Page Should correctly render challenges page for students who hadn't passed previous lessons 1`] = ` -
-
- -
-
-
-
-
-
- lesson-cover -
-

- - Go Back - -

-

- Trees -

-
-
- -
-
-
- - -
-
-
-
-
-
- 1. Given a binary tree, find the largest value -
-
-
-
-
-
- 2. Given a binary tree, find the maximum depth -
-
-
-
-
-
- 3. Given a binary tree, return the maximum distance between any 2 nodes -
-
-
-
-
-
- 4. Biggest subtree value -
-
-
-
-
-
- 5. Given a binary tree and a node, find the distance to that node. -
-
-
-
-
-
- 6. Max Fun -
-
-
-
-
-
- 7. Edit distance -
-
-
-
-
-
- 8. Maximum Loot -
-
-
-
-
-
- 9. Longest Increasing Non-Consecutive Sequence -
-
-
-
-
-
- 10. Minimum Coins for Change -
-
-
-
-
-
- 11. Maximum Weight to Carry -
-
-
-
-
-
- 12. Subarray Sum Equals K -
-
-
-
-
-
-
-

- Given a binary tree, find the largest value -

-
-
-

- Example: -

-

- tree -

-
-                        
-                          const a = {val: 30, right: {val: 40}, left: {val: 50}};
-solution(a); // should return 50
-                        
-                      
-
-
-
-
-
-
-
-
-
-
- © Copyright 2022 GarageScript -
-
-
-`; - -exports[`Lesson Page Should render correctly with invalid lesson route 1`] = ` -
- -
-
- -
-

- 404 Error! -

-
- Lesson not found -
- -
-
-
-
- © Copyright 2022 GarageScript -
-
-`; - -exports[`Lesson Page Should render correctly with valid lesson route 1`] = ` -
-
- -
-
-
-
-
-
- lesson-cover -
-

- - Go Back - -

-

- Variables & Functions -

-
-
- -
-
-
- - -
-
-
-
-
-
- 1. Incremental Closure -
-
-
-
-
-
- 2. Closure x times -
-
-
-
-
-
- 3. Repeated String -
-
-
-
-
-
- 4. Calling input function -
-
-
-
-
-
- 5. Call function X Times -
-
-
-
-
-
- 6. isPrime -
-
-
-
-
-
- 7. Letter Find -
-
-
-
-
-
- 8. Letter Count -
-
-
-
-
-
- 9. Letter Map -
-
-
-
-
-
- 10. Letter Loop -
-
-
-
-
-
- 11. Delayed Closure -
-
-
-
-
-
- 12. Delay 1 and 2 -
-
-
-
-
-
-
-

- Incremental Closure -

-
-
-

- Write a function called solution that takes in a number and returns a function. -

-

- whenever the returned function is called, the next incremental number will be returned -

-

- Example: -

-
-                        
-                          let resf = solution(5)
-result = resf() // 6
-result = resf() // 7
-
-resf = solution(-5)
-result = resf() // -4
-result = resf() // -3
-                        
-                      
-
-
-
-
-
-
-
-
-
-
- © Copyright 2022 GarageScript -
-
-
-`; - -exports[`Lesson Page Should return Bad data if alerts or lessons are missing 1`] = ` -
- -
-
- -
-

- 500 Error! -

-
- Bad data -
- -
-
-
-
- © Copyright 2022 GarageScript -
-
-`; +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Lesson Page Should correctly render challenges page for students who hadn't passed previous lessons 1`] = ` +
+
+ +
+
+
+
+
+
+ lesson-cover +
+

+ + Go Back + +

+

+ Trees +

+
+
+ +
+
+
+ + +
+
+
+
+
+
+ 1. Given a binary tree, find the largest value +
+
+
+
+
+
+ 2. Given a binary tree, find the maximum depth +
+
+
+
+
+
+ 3. Given a binary tree, return the maximum distance between any 2 nodes +
+
+
+
+
+
+ 4. Biggest subtree value +
+
+
+
+
+
+ 5. Given a binary tree and a node, find the distance to that node. +
+
+
+
+
+
+ 6. Max Fun +
+
+
+
+
+
+ 7. Edit distance +
+
+
+
+
+
+ 8. Maximum Loot +
+
+
+
+
+
+ 9. Longest Increasing Non-Consecutive Sequence +
+
+
+
+
+
+ 10. Minimum Coins for Change +
+
+
+
+
+
+ 11. Maximum Weight to Carry +
+
+
+
+
+
+ 12. Subarray Sum Equals K +
+
+
+
+
+
+
+

+ Given a binary tree, find the largest value +

+
+
+

+ Example: +

+

+ tree +

+
+                        
+                          const a = {val: 30, right: {val: 40}, left: {val: 50}};
+solution(a); // should return 50
+                        
+                      
+
+
+
+
+
+
+
+
+
+
+ © Copyright 2022 GarageScript +
+
+
+`; + +exports[`Lesson Page Should render correctly with invalid lesson route 1`] = ` +
+ +
+
+ +
+

+ 404 Error! +

+
+ Lesson not found +
+ +
+
+
+
+ © Copyright 2022 GarageScript +
+
+`; + +exports[`Lesson Page Should render correctly with valid lesson route 1`] = ` +
+
+ +
+
+
+
+
+
+ lesson-cover +
+

+ + Go Back + +

+

+ Variables & Functions +

+
+
+ +
+
+
+ + +
+
+
+
+
+
+ 1. Incremental Closure +
+
+
+
+
+
+ 2. Closure x times +
+
+
+
+
+
+ 3. Repeated String +
+
+
+
+
+
+ 4. Calling input function +
+
+
+
+
+
+ 5. Call function X Times +
+
+
+
+
+
+ 6. isPrime +
+
+
+
+
+
+ 7. Letter Find +
+
+
+
+
+
+ 8. Letter Count +
+
+
+
+
+
+ 9. Letter Map +
+
+
+
+
+
+ 10. Letter Loop +
+
+
+
+
+
+ 11. Delayed Closure +
+
+
+
+
+
+ 12. Delay 1 and 2 +
+
+
+
+
+
+
+

+ Incremental Closure +

+
+
+

+ Write a function called solution that takes in a number and returns a function. +

+

+ whenever the returned function is called, the next incremental number will be returned +

+

+ Example: +

+
+                        
+                          let resf = solution(5)
+result = resf() // 6
+result = resf() // 7
+
+resf = solution(-5)
+result = resf() // -4
+result = resf() // -3
+                        
+                      
+
+
+
+
+
+
+
+
+
+
+ © Copyright 2022 GarageScript +
+
+
+`; + +exports[`Lesson Page Should return Bad data if alerts or lessons are missing 1`] = ` +
+ +
+
+ +
+

+ 500 Error! +

+
+ Bad data +
+ +
+
+
+
+ © Copyright 2022 GarageScript +
+
+`; \ No newline at end of file From b60bb35c5a0b4d8d8f440c2647f16e266bfe3f15 Mon Sep 17 00:00:00 2001 From: HS-90 <77421872+HS-90@users.noreply.github.com> Date: Tue, 31 Jan 2023 15:01:20 -0500 Subject: [PATCH 05/17] Add files via upload --- .../__snapshots__/username.test.js.snap | 11644 ++++++++-------- 1 file changed, 5822 insertions(+), 5822 deletions(-) diff --git a/__tests__/pages/profile/__snapshots__/username.test.js.snap b/__tests__/pages/profile/__snapshots__/username.test.js.snap index f8bec2157..16a8ca38f 100644 --- a/__tests__/pages/profile/__snapshots__/username.test.js.snap +++ b/__tests__/pages/profile/__snapshots__/username.test.js.snap @@ -1,5822 +1,5822 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`user profile test Should render anonymous users 1`] = ` -
- -
-
-
-
-
- -
-

- A -

-
- - @fakeusername - -
-
- -
-
-
-
-
-
-

- Lessons -

-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
-
-
-

- Challenges -

-
-
-
- -
-
-
- Foundations of JavaScript -
-
- 0 of 10 Challenges completed -
-
- - - - - - - - - - -
-
-
-
-
- -
-
-
- Variables & Functions -
-
- 0 of 12 Challenges completed -
-
- - - - - - - - - - - - -
-
-
-
-
- -
-
-
- Arrays -
-
- 0 of 11 Challenges completed -
-
- - - - - - - - - - - -
-
-
-
-
- -
-
-
- Objects -
-
- 0 of 10 Challenges completed -
-
- - - - - - - - - - -
-
-
-
-
- -
-
-
- Front End Engineering -
-
- 0 of 7 Challenges completed -
-
- - - - - - - -
-
-
-
-
- -
-
-
- End To End -
-
- 0 of 9 Challenges completed -
-
- - - - - - - - - -
-
-
-
-
- -
-
-
- React, GraphQL, SocketIO -
-
- 0 of 8 Challenges completed -
-
- - - - - - - - -
-
-
-
-
- -
-
-
- JavaScript Algorithms -
-
- 0 of 11 Challenges completed -
-
- - - - - - - - - - - -
-
-
-
-
- -
-
-
- Trees -
-
- 0 of 12 Challenges completed -
-
- - - - - - - - - - - - -
-
-
-
-
- -
-
-
- General Algorithms -
-
- 0 of 5 Challenges completed -
-
- - - - - -
-
-
-
-
-
-
-
-
-
- © Copyright 2022 GarageScript -
-
-`; - -exports[`user profile test Should render if no stars received 1`] = ` -
- -
-
-
-
-
- -
-

- fake user -

-
- - @fakeusername - -
-
- -
-
-
-
-
-
-

- Lessons -

-
- -
-
-

- 8% -

- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
-
-
-

- Challenges -

-
-
-
- -
-
-
- Foundations of JavaScript -
-
- 0 of 10 Challenges completed -
-
- - - - - - - - - - -
-
-
-
-
- -
-
-
- Variables & Functions -
-
- 1 of 12 Challenges completed -
-
- - - - - - - - - - - - -
-
-
-
-
- -
-
-
- Arrays -
-
- 0 of 11 Challenges completed -
-
- - - - - - - - - - - -
-
-
-
-
- -
-
-
- Objects -
-
- 0 of 10 Challenges completed -
-
- - - - - - - - - - -
-
-
-
-
- -
-
-
- Front End Engineering -
-
- 0 of 7 Challenges completed -
-
- - - - - - - -
-
-
-
-
- -
-
-
- End To End -
-
- 0 of 9 Challenges completed -
-
- - - - - - - - - -
-
-
-
-
- -
-
-
- React, GraphQL, SocketIO -
-
- 0 of 8 Challenges completed -
-
- - - - - - - - -
-
-
-
-
- -
-
-
- JavaScript Algorithms -
-
- 0 of 11 Challenges completed -
-
- - - - - - - - - - - -
-
-
-
-
- -
-
-
- Trees -
-
- 0 of 12 Challenges completed -
-
- - - - - - - - - - - - -
-
-
-
-
- -
-
-
- General Algorithms -
-
- 0 of 5 Challenges completed -
-
- - - - - -
-
-
-
-
-
-
-
-
-
- © Copyright 2022 GarageScript -
-
-`; - -exports[`user profile test Should render nulled challenges 1`] = ` -
- -
-
-
-
-
- -
-

- fake user -

-
- - @fakeusername - -
-
-
-
-
-
-
-

- Lessons -

-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
-
-
-

- Challenges -

-
-
-
- -
-
-
- Foundations of JavaScript -
-
- 0 of 10 Challenges completed -
-
- - - - - - - - - - -
-
-
-
-
- -
-
-
- Variables & Functions -
-
- 0 of 12 Challenges completed -
-
- - - - - - - - - - - - -
-
-
-
-
- -
-
-
- Arrays -
-
- 0 of 11 Challenges completed -
-
- - - - - - - - - - - -
-
-
-
-
- -
-
-
- Objects -
-
- 0 of 10 Challenges completed -
-
- - - - - - - - - - -
-
-
-
-
- -
-
-
- Front End Engineering -
-
- 0 of 7 Challenges completed -
-
- - - - - - - -
-
-
-
-
- -
-
-
- End To End -
-
- 0 of 9 Challenges completed -
-
- - - - - - - - - -
-
-
-
-
- -
-
-
- React, GraphQL, SocketIO -
-
- 0 of 8 Challenges completed -
-
- - - - - - - - -
-
-
-
-
- -
-
-
- JavaScript Algorithms -
-
- 0 of 11 Challenges completed -
-
- - - - - - - - - - - -
-
-
-
-
- -
-
-
- Trees -
-
- 0 of 12 Challenges completed -
-
- - - - - - - - - - - - -
-
-
-
-
- -
-
-
- General Algorithms -
-
- 0 of 5 Challenges completed -
-
- - - - - -
-
-
-
-
- -
-
-
-
- 0 of 3 Challenges completed -
-
- - - -
-
-
-
-
-
-
-
-
-
- © Copyright 2022 GarageScript -
-
-`; - -exports[`user profile test Should render nulled submission lessonIds 1`] = ` -
- -
-
-
-
-
- -
-

- fake user -

-
- - @fakeusername - -
-
- -
-
-
-
-
-
-

- Lessons -

-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
-
-
-

- Challenges -

-
-
-
- -
-
-
- Foundations of JavaScript -
-
- 0 of 10 Challenges completed -
-
- - - - - - - - - - -
-
-
-
-
- -
-
-
- Variables & Functions -
-
- 1 of 12 Challenges completed -
-
- - - - - - - - - - - - -
-
-
-
-
- -
-
-
- Arrays -
-
- 0 of 11 Challenges completed -
-
- - - - - - - - - - - -
-
-
-
-
- -
-
-
- Objects -
-
- 0 of 10 Challenges completed -
-
- - - - - - - - - - -
-
-
-
-
- -
-
-
- Front End Engineering -
-
- 0 of 7 Challenges completed -
-
- - - - - - - -
-
-
-
-
- -
-
-
- End To End -
-
- 0 of 9 Challenges completed -
-
- - - - - - - - - -
-
-
-
-
- -
-
-
- React, GraphQL, SocketIO -
-
- 0 of 8 Challenges completed -
-
- - - - - - - - -
-
-
-
-
- -
-
-
- JavaScript Algorithms -
-
- 0 of 11 Challenges completed -
-
- - - - - - - - - - - -
-
-
-
-
- -
-
-
- Trees -
-
- 0 of 12 Challenges completed -
-
- - - - - - - - - - - - -
-
-
-
-
- -
-
-
- General Algorithms -
-
- 0 of 5 Challenges completed -
-
- - - - - -
-
-
-
-
-
-
-
-
-
- © Copyright 2022 GarageScript -
-
-`; - -exports[`user profile test Should render profile 1`] = ` -
- -
-
-
-
-
- -
-

- fake user -

-
- - @fake user - -
-
-
-
-
-
-

- Stars -

-
-
-
-
-
-
-
- nn -
-
-
- @newbie -
-
- Foundations of JavaScript -
-
-
- - - -
-
-
-

- Thanks for your halp! -

-
-
-
-
-
-
- nn -
-
-
- @newbie -
-
- Variables & Functions -
-
-
- - - -
-
-
-

- Thanks for your halp! -

-
-
-
-
-
-
- A -
-
-
- @anonymous -
-
- Variables & Functions -
-
-
- - - -
-
-
-
-
-
-
-
-
-
-

- Lessons -

-
- -
-
-

- 16% -

- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
-
-
-

- Challenges -

-
-
-
-

- 1 - - - - - -

- -
-
-
- Foundations of JavaScript -
-
- 0 of 10 Challenges completed -
-
- - - - - - - - - - -
-
-
-
-
-

- 1 - - - - - -

- -
-
-
- Variables & Functions -
-
- 2 of 12 Challenges completed -
-
- - - - - - - - - - - - -
-
-
-
-
-

- 1 - - - - - -

- -
-
-
- Arrays -
-
- 0 of 11 Challenges completed -
-
- - - - - - - - - - - -
-
-
-
-
- -
-
-
- Objects -
-
- 0 of 10 Challenges completed -
-
- - - - - - - - - - -
-
-
-
-
- -
-
-
- Front End Engineering -
-
- 0 of 7 Challenges completed -
-
- - - - - - - -
-
-
-
-
- -
-
-
- End To End -
-
- 0 of 9 Challenges completed -
-
- - - - - - - - - -
-
-
-
-
- -
-
-
- React, GraphQL, SocketIO -
-
- 0 of 8 Challenges completed -
-
- - - - - - - - -
-
-
-
-
- -
-
-
- JavaScript Algorithms -
-
- 0 of 11 Challenges completed -
-
- - - - - - - - - - - -
-
-
-
-
- -
-
-
- Trees -
-
- 0 of 12 Challenges completed -
-
- - - - - - - - - - - - -
-
-
-
-
- -
-
-
- General Algorithms -
-
- 0 of 5 Challenges completed -
-
- - - - - -
-
-
-
-
-
-
-
-
-
- © Copyright 2022 GarageScript -
-
-`; - -exports[`user profile test should render discord avatar and username if user connected to discord 1`] = ` -
- -
-
-
-
-
-
- -
-
-

- fake user -

-
- - @fakeusername - -
-
- - -
-
-
-
-
-

- Stars -

-
-
-
-
-
-
-
- nn -
-
-
- @newbie -
-
- Foundations of JavaScript -
-
-
- - - -
-
-
-

- Thanks for your halp! -

-
-
-
-
-
-
- nn -
-
-
- @newbie -
-
- Variables & Functions -
-
-
- - - -
-
-
-

- Thanks for your halp! -

-
-
-
-
-
-
- A -
-
-
- @anonymous -
-
- Variables & Functions -
-
-
- - - -
-
-
-
-
-
-
-
-
-
-

- Lessons -

-
- -
-
-

- 16% -

- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
-
-
-

- Challenges -

-
-
-
-

- 1 - - - - - -

- -
-
-
- Foundations of JavaScript -
-
- 0 of 10 Challenges completed -
-
- - - - - - - - - - -
-
-
-
-
-

- 1 - - - - - -

- -
-
-
- Variables & Functions -
-
- 2 of 12 Challenges completed -
-
- - - - - - - - - - - - -
-
-
-
-
-

- 1 - - - - - -

- -
-
-
- Arrays -
-
- 0 of 11 Challenges completed -
-
- - - - - - - - - - - -
-
-
-
-
- -
-
-
- Objects -
-
- 0 of 10 Challenges completed -
-
- - - - - - - - - - -
-
-
-
-
- -
-
-
- Front End Engineering -
-
- 0 of 7 Challenges completed -
-
- - - - - - - -
-
-
-
-
- -
-
-
- End To End -
-
- 0 of 9 Challenges completed -
-
- - - - - - - - - -
-
-
-
-
- -
-
-
- React, GraphQL, SocketIO -
-
- 0 of 8 Challenges completed -
-
- - - - - - - - -
-
-
-
-
- -
-
-
- JavaScript Algorithms -
-
- 0 of 11 Challenges completed -
-
- - - - - - - - - - - -
-
-
-
-
- -
-
-
- Trees -
-
- 0 of 12 Challenges completed -
-
- - - - - - - - - - - - -
-
-
-
-
- -
-
-
- General Algorithms -
-
- 0 of 5 Challenges completed -
-
- - - - - -
-
-
-
-
-
-
-
-
-
- © Copyright 2022 GarageScript -
-
-`; +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`user profile test Should render anonymous users 1`] = ` +
+ +
+
+
+
+
+ +
+

+ A +

+
+ + @fakeusername + +
+
+ +
+
+
+
+
+
+

+ Lessons +

+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+

+ Challenges +

+
+
+
+ +
+
+
+ Foundations of JavaScript +
+
+ 0 of 10 Challenges completed +
+
+ + + + + + + + + + +
+
+
+
+
+ +
+
+
+ Variables & Functions +
+
+ 0 of 12 Challenges completed +
+
+ + + + + + + + + + + + +
+
+
+
+
+ +
+
+
+ Arrays +
+
+ 0 of 11 Challenges completed +
+
+ + + + + + + + + + + +
+
+
+
+
+ +
+
+
+ Objects +
+
+ 0 of 10 Challenges completed +
+
+ + + + + + + + + + +
+
+
+
+
+ +
+
+
+ Front End Engineering +
+
+ 0 of 7 Challenges completed +
+
+ + + + + + + +
+
+
+
+
+ +
+
+
+ End To End +
+
+ 0 of 9 Challenges completed +
+
+ + + + + + + + + +
+
+
+
+
+ +
+
+
+ React, GraphQL, SocketIO +
+
+ 0 of 8 Challenges completed +
+
+ + + + + + + + +
+
+
+
+
+ +
+
+
+ JavaScript Algorithms +
+
+ 0 of 11 Challenges completed +
+
+ + + + + + + + + + + +
+
+
+
+
+ +
+
+
+ Trees +
+
+ 0 of 12 Challenges completed +
+
+ + + + + + + + + + + + +
+
+
+
+
+ +
+
+
+ General Algorithms +
+
+ 0 of 5 Challenges completed +
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+ © Copyright 2022 GarageScript +
+
+`; + +exports[`user profile test Should render if no stars received 1`] = ` +
+ +
+
+
+
+
+ +
+

+ fake user +

+
+ + @fakeusername + +
+
+ +
+
+
+
+
+
+

+ Lessons +

+
+ +
+
+

+ 8% +

+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+

+ Challenges +

+
+
+
+ +
+
+
+ Foundations of JavaScript +
+
+ 0 of 10 Challenges completed +
+
+ + + + + + + + + + +
+
+
+
+
+ +
+
+
+ Variables & Functions +
+
+ 1 of 12 Challenges completed +
+
+ + + + + + + + + + + + +
+
+
+
+
+ +
+
+
+ Arrays +
+
+ 0 of 11 Challenges completed +
+
+ + + + + + + + + + + +
+
+
+
+
+ +
+
+
+ Objects +
+
+ 0 of 10 Challenges completed +
+
+ + + + + + + + + + +
+
+
+
+
+ +
+
+
+ Front End Engineering +
+
+ 0 of 7 Challenges completed +
+
+ + + + + + + +
+
+
+
+
+ +
+
+
+ End To End +
+
+ 0 of 9 Challenges completed +
+
+ + + + + + + + + +
+
+
+
+
+ +
+
+
+ React, GraphQL, SocketIO +
+
+ 0 of 8 Challenges completed +
+
+ + + + + + + + +
+
+
+
+
+ +
+
+
+ JavaScript Algorithms +
+
+ 0 of 11 Challenges completed +
+
+ + + + + + + + + + + +
+
+
+
+
+ +
+
+
+ Trees +
+
+ 0 of 12 Challenges completed +
+
+ + + + + + + + + + + + +
+
+
+
+
+ +
+
+
+ General Algorithms +
+
+ 0 of 5 Challenges completed +
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+ © Copyright 2022 GarageScript +
+
+`; + +exports[`user profile test Should render nulled challenges 1`] = ` +
+ +
+
+
+
+
+ +
+

+ fake user +

+
+ + @fakeusername + +
+
+
+
+
+
+
+

+ Lessons +

+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+

+ Challenges +

+
+
+
+ +
+
+
+ Foundations of JavaScript +
+
+ 0 of 10 Challenges completed +
+
+ + + + + + + + + + +
+
+
+
+
+ +
+
+
+ Variables & Functions +
+
+ 0 of 12 Challenges completed +
+
+ + + + + + + + + + + + +
+
+
+
+
+ +
+
+
+ Arrays +
+
+ 0 of 11 Challenges completed +
+
+ + + + + + + + + + + +
+
+
+
+
+ +
+
+
+ Objects +
+
+ 0 of 10 Challenges completed +
+
+ + + + + + + + + + +
+
+
+
+
+ +
+
+
+ Front End Engineering +
+
+ 0 of 7 Challenges completed +
+
+ + + + + + + +
+
+
+
+
+ +
+
+
+ End To End +
+
+ 0 of 9 Challenges completed +
+
+ + + + + + + + + +
+
+
+
+
+ +
+
+
+ React, GraphQL, SocketIO +
+
+ 0 of 8 Challenges completed +
+
+ + + + + + + + +
+
+
+
+
+ +
+
+
+ JavaScript Algorithms +
+
+ 0 of 11 Challenges completed +
+
+ + + + + + + + + + + +
+
+
+
+
+ +
+
+
+ Trees +
+
+ 0 of 12 Challenges completed +
+
+ + + + + + + + + + + + +
+
+
+
+
+ +
+
+
+ General Algorithms +
+
+ 0 of 5 Challenges completed +
+
+ + + + + +
+
+
+
+
+ +
+
+
+
+ 0 of 3 Challenges completed +
+
+ + + +
+
+
+
+
+
+
+
+
+
+ © Copyright 2022 GarageScript +
+
+`; + +exports[`user profile test Should render nulled submission lessonIds 1`] = ` +
+ +
+
+
+
+
+ +
+

+ fake user +

+
+ + @fakeusername + +
+
+ +
+
+
+
+
+
+

+ Lessons +

+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+

+ Challenges +

+
+
+
+ +
+
+
+ Foundations of JavaScript +
+
+ 0 of 10 Challenges completed +
+
+ + + + + + + + + + +
+
+
+
+
+ +
+
+
+ Variables & Functions +
+
+ 1 of 12 Challenges completed +
+
+ + + + + + + + + + + + +
+
+
+
+
+ +
+
+
+ Arrays +
+
+ 0 of 11 Challenges completed +
+
+ + + + + + + + + + + +
+
+
+
+
+ +
+
+
+ Objects +
+
+ 0 of 10 Challenges completed +
+
+ + + + + + + + + + +
+
+
+
+
+ +
+
+
+ Front End Engineering +
+
+ 0 of 7 Challenges completed +
+
+ + + + + + + +
+
+
+
+
+ +
+
+
+ End To End +
+
+ 0 of 9 Challenges completed +
+
+ + + + + + + + + +
+
+
+
+
+ +
+
+
+ React, GraphQL, SocketIO +
+
+ 0 of 8 Challenges completed +
+
+ + + + + + + + +
+
+
+
+
+ +
+
+
+ JavaScript Algorithms +
+
+ 0 of 11 Challenges completed +
+
+ + + + + + + + + + + +
+
+
+
+
+ +
+
+
+ Trees +
+
+ 0 of 12 Challenges completed +
+
+ + + + + + + + + + + + +
+
+
+
+
+ +
+
+
+ General Algorithms +
+
+ 0 of 5 Challenges completed +
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+ © Copyright 2022 GarageScript +
+
+`; + +exports[`user profile test Should render profile 1`] = ` +
+ +
+
+
+
+
+ +
+

+ fake user +

+
+ + @fake user + +
+
+
+
+
+
+

+ Stars +

+
+
+
+
+
+
+
+ nn +
+
+
+ @newbie +
+
+ Foundations of JavaScript +
+
+
+ + + +
+
+
+

+ Thanks for your halp! +

+
+
+
+
+
+
+ nn +
+
+
+ @newbie +
+
+ Variables & Functions +
+
+
+ + + +
+
+
+

+ Thanks for your halp! +

+
+
+
+
+
+
+ A +
+
+
+ @anonymous +
+
+ Variables & Functions +
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+

+ Lessons +

+
+ +
+
+

+ 16% +

+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+

+ Challenges +

+
+
+
+

+ 1 + + + + + +

+ +
+
+
+ Foundations of JavaScript +
+
+ 0 of 10 Challenges completed +
+
+ + + + + + + + + + +
+
+
+
+
+

+ 1 + + + + + +

+ +
+
+
+ Variables & Functions +
+
+ 2 of 12 Challenges completed +
+
+ + + + + + + + + + + + +
+
+
+
+
+

+ 1 + + + + + +

+ +
+
+
+ Arrays +
+
+ 0 of 11 Challenges completed +
+
+ + + + + + + + + + + +
+
+
+
+
+ +
+
+
+ Objects +
+
+ 0 of 10 Challenges completed +
+
+ + + + + + + + + + +
+
+
+
+
+ +
+
+
+ Front End Engineering +
+
+ 0 of 7 Challenges completed +
+
+ + + + + + + +
+
+
+
+
+ +
+
+
+ End To End +
+
+ 0 of 9 Challenges completed +
+
+ + + + + + + + + +
+
+
+
+
+ +
+
+
+ React, GraphQL, SocketIO +
+
+ 0 of 8 Challenges completed +
+
+ + + + + + + + +
+
+
+
+
+ +
+
+
+ JavaScript Algorithms +
+
+ 0 of 11 Challenges completed +
+
+ + + + + + + + + + + +
+
+
+
+
+ +
+
+
+ Trees +
+
+ 0 of 12 Challenges completed +
+
+ + + + + + + + + + + + +
+
+
+
+
+ +
+
+
+ General Algorithms +
+
+ 0 of 5 Challenges completed +
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+ © Copyright 2022 GarageScript +
+
+`; + +exports[`user profile test should render discord avatar and username if user connected to discord 1`] = ` +
+ +
+
+
+
+
+
+ +
+
+

+ fake user +

+
+ + @fakeusername + +
+
+ + +
+
+
+
+
+

+ Stars +

+
+
+
+
+
+
+
+ nn +
+
+
+ @newbie +
+
+ Foundations of JavaScript +
+
+
+ + + +
+
+
+

+ Thanks for your halp! +

+
+
+
+
+
+
+ nn +
+
+
+ @newbie +
+
+ Variables & Functions +
+
+
+ + + +
+
+
+

+ Thanks for your halp! +

+
+
+
+
+
+
+ A +
+
+
+ @anonymous +
+
+ Variables & Functions +
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+

+ Lessons +

+
+ +
+
+

+ 16% +

+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+

+ Challenges +

+
+
+
+

+ 1 + + + + + +

+ +
+
+
+ Foundations of JavaScript +
+
+ 0 of 10 Challenges completed +
+
+ + + + + + + + + + +
+
+
+
+
+

+ 1 + + + + + +

+ +
+
+
+ Variables & Functions +
+
+ 2 of 12 Challenges completed +
+
+ + + + + + + + + + + + +
+
+
+
+
+

+ 1 + + + + + +

+ +
+
+
+ Arrays +
+
+ 0 of 11 Challenges completed +
+
+ + + + + + + + + + + +
+
+
+
+
+ +
+
+
+ Objects +
+
+ 0 of 10 Challenges completed +
+
+ + + + + + + + + + +
+
+
+
+
+ +
+
+
+ Front End Engineering +
+
+ 0 of 7 Challenges completed +
+
+ + + + + + + +
+
+
+
+
+ +
+
+
+ End To End +
+
+ 0 of 9 Challenges completed +
+
+ + + + + + + + + +
+
+
+
+
+ +
+
+
+ React, GraphQL, SocketIO +
+
+ 0 of 8 Challenges completed +
+
+ + + + + + + + +
+
+
+
+
+ +
+
+
+ JavaScript Algorithms +
+
+ 0 of 11 Challenges completed +
+
+ + + + + + + + + + + +
+
+
+
+
+ +
+
+
+ Trees +
+
+ 0 of 12 Challenges completed +
+
+ + + + + + + + + + + + +
+
+
+
+
+ +
+
+
+ General Algorithms +
+
+ 0 of 5 Challenges completed +
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+ © Copyright 2022 GarageScript +
+
+`; \ No newline at end of file From 16305040d9c9fed795e9b70bab632b436da8412a Mon Sep 17 00:00:00 2001 From: HS-90 <77421872+HS-90@users.noreply.github.com> Date: Tue, 31 Jan 2023 15:01:48 -0500 Subject: [PATCH 06/17] Add files via upload --- .../__snapshots__/[lesson].test.js.snap | 12816 ++++++++-------- 1 file changed, 6408 insertions(+), 6408 deletions(-) diff --git a/__tests__/pages/review/__snapshots__/[lesson].test.js.snap b/__tests__/pages/review/__snapshots__/[lesson].test.js.snap index 36dfafea9..89873beb6 100644 --- a/__tests__/pages/review/__snapshots__/[lesson].test.js.snap +++ b/__tests__/pages/review/__snapshots__/[lesson].test.js.snap @@ -1,6408 +1,6408 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Lesson Page Should render Error component if route is invalid 1`] = ` -
- -
-
- -
-

- 404 Error! -

-
- Page not found -
- -
-
-
-
- © Copyright 2022 GarageScript -
-
-`; - -exports[`Lesson Page Should render empty submissions 1`] = ` -
-
- -
-
-
-
-
- lesson-cover -
-

- - Go Back - -

-

- Variables & Functions -

-
-
- -
-
-
- -
-
-
-
- © Copyright 2022 GarageScript -
-
-
-`; - -exports[`Lesson Page Should render new submissions 1`] = ` -
-
- -
-
-
-
-
- lesson-cover -
-

- - Go Back - -

-

- Variables & Functions -

-
-
- -
-
-
-
-
-
-
-

- newbie - - - - - Sum of 2 Numbers - -

-
-
- 16 days ago -
-
-
-
-
-

- Select submission -

-
-
- -
-
- -
-
- -
-
-
-
-
-
-
-
-
-
-

- -

-
-
- - Write a function that takes in 2 numbers and returns their sum. Here's how another developer might use your function: solution(5,9) // Should return 14 solution(4,1) // Should return 5 - -
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - foobar.js - - -
- - -
- -
-
-                            
-
-                                1
-                              
-
-
-                                +
-                              
-
-
-                                
-                                  
-                                    /*
-                                  
-                                
-                              
-
-
-                            
-
-                                2
-                              
-
-
-                                +
-                              
-
-
-                                
-                                  
-                                    SUBMISSION
-                                  
-                                   
-                                  
-                                    B
-                                  
-                                
-                              
-
-
-                            
-
-                                3
-                              
-
-
-                                +
-                              
-
-
-                                
-                                  
-                                    THIS
-                                  
-                                   
-                                  
-                                    IS
-                                  
-                                   
-                                  
-                                    A
-                                  
-                                   
-                                  
-                                    MOCK
-                                  
-                                   
-                                  
-                                    SUBMISSION
-                                  
-                                   
-                                  
-                                    TO
-                                  
-                                   
-                                  
-                                    TEST
-                                  
-                                   
-                                  
-                                    COMMENTS
-                                  
-                                
-                              
-
-
-                            
-
-                                4
-                              
-
-
-                                +
-                              
-
-
-                                
-                              
-
-
-                            
-
-                                5
-                              
-
-
-                                +
-                              
-
-
-                                
-                                  
-                                    DO
-                                  
-                                   
-                                  
-                                    NOT
-                                  
-                                   
-                                  
-                                    CLOSE
-                                  
-                                   
-                                  
-                                    IT
-                                  
-                                  
-                                    ,
-                                  
-                                   
-                                  
-                                    PLEASE
-                                  
-                                
-                              
-
-
-                            
-
-                                6
-                              
-
-
-                                +
-                              
-
-
-                                
-                                  
-                                    *
-                                  
-                                  
-                                    /
-                                  
-                                
-                              
-
-
-                            
-
-                                7
-                              
-
-
-                                +
-                              
-
-
-                                
-                              
-
-
-                            
-
-                                8
-                              
-
-
-                                +
-                              
-
-
-                                
-                                  
-                                    const
-                                  
-                                   fetch 
-                                  
-                                    =
-                                  
-                                   
-                                  
-                                    require
-                                  
-                                  
-                                    (
-                                  
-                                  
-                                    "node-fetch"
-                                  
-                                  
-                                    )
-                                  
-                                  
-                                    ;
-                                  
-                                
-                              
-
-
-                            
-
-                                9
-                              
-
-
-                                +
-                              
-
-
-                                
-                              
-
-
-                            
-
-                                10
-                              
-
-
-                                +
-                              
-
-
-                                
-                                  
-                                    const
-                                  
-                                   fs 
-                                  
-                                    =
-                                  
-                                   
-                                  
-                                    require
-                                  
-                                  
-                                    (
-                                  
-                                  
-                                    "fs"
-                                  
-                                  
-                                    )
-                                  
-                                  
-                                    ;
-                                  
-                                
-                              
-
-
-                            
-
-                                11
-                              
-
-
-                                +
-                              
-
-
-                                
-                              
-
-
-                            
-
-                                12
-                              
-
-
-                                +
-                              
-
-
-                                
-                                  
-                                    fetch
-                                  
-                                  
-                                    (
-                                  
-                                  
-                                    "https://pokeapi.co/api/v2/pokemon/"
-                                  
-                                  
-                                    )
-                                  
-                                
-                              
-
-
-                            
-
-                                13
-                              
-
-
-                                +
-                              
-
-
-                                
-                                    
-                                  
-                                    .
-                                  
-                                  
-                                    then
-                                  
-                                  
-                                    (
-                                  
-                                  
-                                    (
-                                  
-                                  
-                                    data
-                                  
-                                  
-                                    )
-                                  
-                                   
-                                  
-                                    =>
-                                  
-                                   
-                                  
-                                    {
-                                  
-                                
-                              
-
-
-                            
-
-                                14
-                              
-
-
-                                +
-                              
-
-
-                                
-                                      
-                                  
-                                    return
-                                  
-                                   data
-                                  
-                                    .
-                                  
-                                  
-                                    json
-                                  
-                                  
-                                    (
-                                  
-                                  
-                                    )
-                                  
-                                  
-                                    ;
-                                  
-                                
-                              
-
-
-                            
-
-                                15
-                              
-
-
-                                +
-                              
-
-
-                                
-                                    
-                                  
-                                    }
-                                  
-                                  
-                                    )
-                                  
-                                
-                              
-
-
-                            
-
-                                16
-                              
-
-
-                                +
-                              
-
-
-                                
-                                    
-                                  
-                                    .
-                                  
-                                  
-                                    then
-                                  
-                                  
-                                    (
-                                  
-                                  
-                                    (
-                                  
-                                  
-                                    data
-                                  
-                                  
-                                    )
-                                  
-                                   
-                                  
-                                    =>
-                                  
-                                   
-                                  
-                                    {
-                                  
-                                
-                              
-
-
-                            
-
-                                17
-                              
-
-
-                                +
-                              
-
-
-                                
-                                      
-                                  
-                                    const
-                                  
-                                   fetchPromises 
-                                  
-                                    =
-                                  
-                                   data
-                                  
-                                    .
-                                  
-                                  results
-                                  
-                                    .
-                                  
-                                  
-                                    map
-                                  
-                                  
-                                    (
-                                  
-                                  
-                                    (
-                                  
-                                  
-                                    e
-                                  
-                                  
-                                    )
-                                  
-                                   
-                                  
-                                    =>
-                                  
-                                   
-                                  
-                                    {
-                                  
-                                
-                              
-
-
-                            
-
-                                18
-                              
-
-
-                                +
-                              
-
-
-                                
-                                        
-                                  
-                                    return
-                                  
-                                   
-                                  
-                                    fetch
-                                  
-                                  
-                                    (
-                                  
-                                  e
-                                  
-                                    .
-                                  
-                                  url
-                                  
-                                    )
-                                  
-                                  
-                                    .
-                                  
-                                  
-                                    then
-                                  
-                                  
-                                    (
-                                  
-                                  
-                                    (
-                                  
-                                  
-                                    info
-                                  
-                                  
-                                    )
-                                  
-                                   
-                                  
-                                    =>
-                                  
-                                   
-                                  
-                                    {
-                                  
-                                
-                              
-
-
-                            
-
-                                19
-                              
-
-
-                                +
-                              
-
-
-                                
-                                          
-                                  
-                                    return
-                                  
-                                   info
-                                  
-                                    .
-                                  
-                                  
-                                    json
-                                  
-                                  
-                                    (
-                                  
-                                  
-                                    )
-                                  
-                                  
-                                    ;
-                                  
-                                
-                              
-
-
-                            
-
-                                20
-                              
-
-
-                                +
-                              
-
-
-                                
-                                        
-                                  
-                                    }
-                                  
-                                  
-                                    )
-                                  
-                                  
-                                    ;
-                                  
-                                
-                              
-
-
-                            
-
-                                21
-                              
-
-
-                                +
-                              
-
-
-                                
-                                      
-                                  
-                                    }
-                                  
-                                  
-                                    )
-                                  
-                                  
-                                    ;
-                                  
-                                
-                              
-
-
-                            
-
-                                22
-                              
-
-
-                                +
-                              
-
-
-                                
-                              
-
-
-                            
-
-                                23
-                              
-
-
-                                +
-                              
-
-
-                                
-                                      Promise
-                                  
-                                    .
-                                  
-                                  
-                                    all
-                                  
-                                  
-                                    (
-                                  
-                                  fetchPromises
-                                  
-                                    )
-                                  
-                                
-                              
-
-
-                            
-
-                                24
-                              
-
-
-                                +
-                              
-
-
-                                
-                                        
-                                  
-                                    .
-                                  
-                                  
-                                    then
-                                  
-                                  
-                                    (
-                                  
-                                  
-                                    (
-                                  
-                                  
-                                    result
-                                  
-                                  
-                                    )
-                                  
-                                   
-                                  
-                                    =>
-                                  
-                                   
-                                  
-                                    {
-                                  
-                                
-                              
-
-
-                            
-
-                                25
-                              
-
-
-                                +
-                              
-
-
-                                
-                                          
-                                  
-                                    return
-                                  
-                                   result
-                                  
-                                    .
-                                  
-                                  
-                                    reduce
-                                  
-                                  
-                                    (
-                                  
-                                  
-                                    (
-                                  
-                                  
-                                    acc
-                                    
-                                      ,
-                                    
-                                     pokeInfo
-                                  
-                                  
-                                    )
-                                  
-                                   
-                                  
-                                    =>
-                                  
-                                   
-                                  
-                                    {
-                                  
-                                
-                              
-
-
-                            
-
-                                26
-                              
-
-
-                                +
-                              
-
-
-                                
-                                            
-                                  
-                                    return
-                                  
-                                   
-                                  
-                                    
-                                      \`
-                                    
-                                    
-                                      
-                                        \${
-                                      
-                                      acc
-                                      
-                                        }
-                                      
-                                    
-                                    
-                                      <p>
-                                    
-                                    
-                                      
-                                        \${
-                                      
-                                      pokeInfo
-                                      
-                                        .
-                                      
-                                      name
-                                      
-                                        }
-                                      
-                                    
-                                    
-                                      </p><img src="
-                                    
-                                    
-                                      
-                                        \${
-                                      
-                                      pokeInfo
-                                      
-                                        .
-                                      
-                                      sprites
-                                      
-                                        .
-                                      
-                                      front_default
-                                      
-                                        }
-                                      
-                                    
-                                    
-                                      "/>
-                                    
-                                    
-                                      \`
-                                    
-                                  
-                                  
-                                    ;
-                                  
-                                
-                              
-
-
-                            
-
-                                27
-                              
-
-
-                                +
-                              
-
-
-                                
-                                          
-                                  
-                                    }
-                                  
-                                  
-                                    ,
-                                  
-                                   
-                                  
-                                    
-                                      \`
-                                    
-                                    
-                                      \`
-                                    
-                                  
-                                  
-                                    )
-                                  
-                                  
-                                    ;
-                                  
-                                
-                              
-
-
-                            
-
-                                28
-                              
-
-
-                                +
-                              
-
-
-                                
-                                        
-                                  
-                                    }
-                                  
-                                  
-                                    )
-                                  
-                                
-                              
-
-
-                            
-
-                                29
-                              
-
-
-                                +
-                              
-
-
-                                
-                                        
-                                  
-                                    .
-                                  
-                                  
-                                    then
-                                  
-                                  
-                                    (
-                                  
-                                  
-                                    (
-                                  
-                                  
-                                    htmlStr
-                                  
-                                  
-                                    )
-                                  
-                                   
-                                  
-                                    =>
-                                  
-                                   
-                                  
-                                    {
-                                  
-                                
-                              
-
-
-                            
-
-                                30
-                              
-
-
-                                +
-                              
-
-
-                                
-                                          fs
-                                  
-                                    .
-                                  
-                                  
-                                    writeFile
-                                  
-                                  
-                                    (
-                                  
-                                  
-                                    "9.html"
-                                  
-                                  
-                                    ,
-                                  
-                                   htmlStr
-                                  
-                                    ,
-                                  
-                                   
-                                  
-                                    (
-                                  
-                                  
-                                    )
-                                  
-                                   
-                                  
-                                    =>
-                                  
-                                   
-                                  
-                                    {
-                                  
-                                  
-                                    }
-                                  
-                                  
-                                    )
-                                  
-                                  
-                                    ;
-                                  
-                                
-                              
-
-
-                            
-
-                                31
-                              
-
-
-                                +
-                              
-
-
-                                
-                                        
-                                  
-                                    }
-                                  
-                                  
-                                    )
-                                  
-                                  
-                                    ;
-                                  
-                                
-                              
-
-
-                            
-
-                                32
-                              
-
-
-                                +
-                              
-
-
-                                
-                                    
-                                  
-                                    }
-                                  
-                                  
-                                    )
-                                  
-                                  
-                                    ;
-                                  
-                                
-                              
-
-
-
-
-
- - - - - - - - - - - - - - - - -
- - js7/10.js - - -
- - -
- -
-
-                            
-
-                                1
-                              
-
-
-                                +
-                              
-
-
-                                
-                                  
-                                    const
-                                  
-                                   
-                                  
-                                    parse
-                                  
-                                   
-                                  
-                                    =
-                                  
-                                   
-                                  
-                                    (
-                                  
-                                  
-                                    str
-                                  
-                                  
-                                    )
-                                  
-                                   
-                                  
-                                    =>
-                                  
-                                   
-                                  
-                                    {
-                                  
-                                
-                              
-
-
-                            
-
-                                2
-                              
-
-
-                                +
-                              
-
-
-                                
-                                    
-                                  
-                                    //assume that str is always valid json string
-                                  
-                                
-                                
- Hide conversation -
-
-
-
- - first line comment - -
-
- -
- - -
-
-
-
-
- - first line comment - -
-
- -
- - -
-
-
-
- -