Skip to content
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

Open
wants to merge 46 commits into
base: feedback
Choose a base branch
from
Open

Feedback #1

wants to merge 46 commits into from

Conversation

github-classroom[bot]
Copy link
Contributor

@github-classroom github-classroom bot commented Feb 25, 2022

👋! 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

Copy link

@jhannes jhannes left a 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/
Copy link

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", () => {
Copy link

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

Comment on lines +35 to +42
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
]
Copy link

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) {
Copy link

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>
Copy link

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 }) {
Copy link

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);
Copy link

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"
Copy link

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) => {
Copy link

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": [
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants