-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feedback #1
base: feedback
Are you sure you want to change the base?
Feedback #1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bra levert. Til eksamen bør dere sjekke av at dere har lært supertest og express.Routes. Ta også en titt i logikken, for det ser litt ut som om dere gjør mer på klientsiden enn dere burde. Å forstå oppgaven riktig er viktig for en god karakter.
@@ -0,0 +1,5 @@ | |||
/.idea/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Her sjekket dere inn .idea-filene. Disse bør dere fjerne med git rm --cached .idea
}, | ||
}; | ||
|
||
describe("Quiz game", () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Veldig bra test med både snapshots og simulate
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": { | ||
"node": "current" | ||
} | ||
} | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rart at testene feiler i Github action fordi det er jo dette som skulle fått fikset denne feilen. Ta kontakt om dere fortsatt sliter med dette
|
||
export const QuestionContext = React.createContext({ randomQuestion }); | ||
|
||
async function postJSON(url, json) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For eksamen er det fint om dere flytter ut ting i separate filer
function ShowAnswer() { | ||
return ( | ||
<div> | ||
<Routes> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice med subroutes
); | ||
} | ||
|
||
export function ShowQuestion({ setCorrectAnswers, setQuestionsAnswered }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hvordan oppdaterer dere egentlig correct answers og questions answered? Det funka jo på Heroku?
} | ||
|
||
export function QuizGame() { | ||
const [questionAnswered, setQuestionsAnswered] = useState(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Her er det litt mystisk å ha state å klienten for questionsAnswered og correctAnswers fordi det gjør det lett å misforstå oppgaven å la klienten vite hva som er riktig svar.
"dev": "nodemon server.js", | ||
"start": "node server.js", | ||
"build": "npm install", | ||
"test": "echo \"Error: no test specified\" && exit 1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Til eksamen bør dere ha serverside tester med supertest
app.use(bodyParser.json()); | ||
app.use(cookieParser(process.env.COOKIE_SECRET)); | ||
|
||
app.post("/api/question", (req, res, next) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIl eksamen bør dere bruke express.Route for å organisere serverlogikken
}, | ||
"jest": { | ||
"testEnvironment": "jsdom", | ||
"collectCoverageFrom": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Her må dere pass på å ignorere generert kode i dist og coverage-katalogen. Dere må også inkludere eventuelle *.js-filer
👋! GitHub Classroom created this pull request as a place for your teacher to leave feedback on your work. It will update automatically. Don’t close or merge this pull request, unless you’re instructed to do so by your teacher.
In this pull request, your teacher can leave comments and feedback on your code. Click the Subscribe button to be notified if that happens.
Click the Files changed or Commits tab to see all of the changes pushed to
main
since the assignment started. Your teacher can see this too.Notes for teachers
Use this PR to leave feedback. Here are some tips: - Click the **Files changed** tab to see all of the changes pushed to `main` since the assignment started. To leave comments on specific lines of code, put your cursor over a line of code and click the blue **+** (plus sign). To learn more about comments, read “[Commenting on a pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request)”. - Click the **Commits** tab to see the commits pushed to `main`. Click a commit to see specific changes. - If you turned on autograding, then click the **Checks** tab to see the results. - This page is an overview. It shows commits, line comments, and general comments. You can leave a general comment below. For more information about this pull request, read “[Leaving assignment feedback in GitHub](https://docs.github.com/education/manage-coursework-with-github-classroom/leave-feedback-with-pull-requests)”.Subscribed: @EliseFonnes