Part 12: Testing and Code Quality

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/22

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 5:54 AM on 4/10/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

23 Terms

1
New cards

_____ matters because it helps you catch bugs early, prove your code works, and make changes with more confidence.

Testing

2
New cards

A(n) _____ _____ checks one small piece of code, like a single function, by itself.

unit test

3
New cards

A(n) _____ _____ at a beginner level checks whether multiple parts of your code work correctly together.

integration test

4
New cards

The _____, _____, _____ pattern means you first set up the test data, then run the code, and then check the result.

Arrange, Act, Assert

5
New cards

_____ are the checks in a test that verify whether the actual result matches the expected result.

Assertions

6
New cards

Testing a(n) _____ _____ means checking that your code works correctly in the normal expected situation.

happy path

7
New cards

Testing _____ _____ means checking unusual, extreme, or boundary inputs that could still happen in real use.

edge cases

8
New cards

Testing _____ _____ means checking what your code does when something goes wrong or invalid input is provided.

failure cases

9
New cards

_____ means replacing a real dependency with a fake version so you can control how it behaves during a test.

Mocking

10
New cards

_____ are tools that watch whether a function was called, how many times it was called, and what arguments it received.

Spies

11
New cards

Testing _____ code means checking code that does not finish immediately, such as code that uses promises, timers, or API calls.

async

12
New cards

_____ tests clearly means giving each test a name that explains what is being tested and what result you expect.

Naming

13
New cards

Before you _____ a function, you should test it with normal input, edge cases, and bad input to make sure it behaves correctly.

trust

14
New cards

_____ is the process of automatically checking your code for style problems, possible mistakes, or rule violations.

Linting

15
New cards

_____ is the process of making your code look clean and consistent, such as spacing, indentation, and line breaks.

Formatting

16
New cards

_____ _____ means using variable, function, and class names that clearly describe what they do.

readable naming

17
New cards

_____ _____ are easier to understand, test, reuse, and debug because each one does less.

small functions

18
New cards

A(n) _____ _____ means a function, class, or file should have one main job or reason to change.

single responsibility

19
New cards

_____ stands for “Don’t Repeat Yourself,” which means you should avoid repeating the same logic in multiple places.

DRY

20
New cards

_____ stands for “Keep It Simple, Stupid,” which means you should prefer simpler solutions over unnecessarily complicated ones.

KISS

21
New cards

_____ _____ means different parts of your program should handle different jobs instead of mixing everything together.

separation of concerns

22
New cards

You should _____ code when it works but could be made clearer, cleaner, easier to maintain, or less repetitive without changing what it does.

refactor

23
New cards

When talking about tradeoffs in _____ _____, you should be able to explain why one solution may be simpler, faster, cleaner, or easier to maintain than another.

code quality