You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Make sure to sync your fork before creating a branch in order to pull in the latest changes.
18
19
* Sync your branch often to avoid merge conflicts and execute `git pull` to bring the latest changes to your machine.
19
20
* If your branch is too far behind or you run into too many issues, feel free to delete and re-create your repository. Make sure to review the article linked at the bottom of the [lesson_00](/lesson_00/README.md) README for instructions on how to create your fork and branch properly.
20
-
* Remember, you should not reuse a branch you've used to submit a pull request. If you need to make changes, create a new branch and work from there after you've updated your fork to the latest.
21
+
* Remember, you should not reuse a branch you've used to submit a pull request. If you need to make changes, create a new branch and work from there after you've updated your fork to the latest.
22
+
23
+
### Creating new quiz questions
24
+
25
+
Now's your chance to quiz the instructor! In this assignment, you will modify the quiz project to include three quiz questions based on the content you've learned in this course so far. Feel free to choose any topic for your questions.
26
+
27
+
1. Navigate to the [quiz][quiz-folder] directory and install the required dependencies.
2. You will create a quiz file in the [quizzes folder][quizzes-folder]. You should model yours after the example provided in [anthony_mays_quiz.ts][quiz-example]. Note that the name of the file you create should match the name of the class in the file.
35
+
3. Make sure to provide a unique provider name for your questions provider. You'll need this name to provide answers in step 5.
36
+
```typescript
37
+
getProviderName(): string {
38
+
return'<your unique name goes here>';
39
+
}
40
+
```
41
+
4. Make at least three questions for your quiz and _leave them unanswered_.
42
+
5. To provide answers, you will need to update the [quiz.yaml][test-config-file] file in the test directory. You can copy the example in the file to get started, but you must provide your own answers. To generate an encrypted answer, use [bcrypt.online](https://bcrypt.online).
43
+
6. Lastly, you'll need to modify the [quizzes.module.ts][quizzes-module] file to include your quiz.
44
+
7. Before attempting to submit your quiz, make sure to run the linter on the code and run the tests to ensure that you've updated things correctly. The commands must be run from the [quiz][quiz-folder] sub-folder just like the previous assignment:
45
+
```bash
46
+
npm run check
47
+
```
48
+
8. Once everything passes, submit a PR.
49
+
50
+
**Note: If you want to check that you've encoded your answers correctly, you can update you quiz with the real answers and then run the tests using the command below.
51
+
```bash
52
+
PROVIDER_NAME=<Your provider name here> npm run test
53
+
```
54
+
55
+
### Dealing with merge conflicts
56
+
57
+
Since everyone needs to modify the same files for this assignment, you will most certainly encounter merge conflicts. To resolve this, here are the steps:
58
+
59
+
1. Sync the main branch of your fork and ensure that it is up-to-date.
60
+
2. Use `git checkout main` and `git pull` to get the latest updates pulled down to your computer.
61
+
3. Checkout your feature branch (e.g. `git checkout feature/lesson_03`).
62
+
4. Run `git rebase main` on your feature branch to pull in the latest changes and deal with merge conflicts.
63
+
5. Use the *Source Control* view in VS Code to identify files with conflicts. Click to open them and use the *Merge Editor* to resolve conflicts.
64
+
6. Stage and commit the changed files.
65
+
7. Repeat steps 5-6 until the rebase is complete.
66
+
67
+
An alternative approach is to open the PR and manually edit the conflicting files to work out any issues. This may be easier for some of you, but it can also be tricky to do if you don't know what you're doing.
68
+
69
+
Check out [this YouTube video](https://www.youtube.com/watch?v=OXtdxHTh2oY) for a quick explaination of what's going on.
0 commit comments