# Unit Test

A small automated check of one focused unit of behavior.

## What is **Unit Test** in JavaScript?

**Unit Test** — A small automated check of one focused unit of behavior.

```javascript
test("totals an order", () => {
    expect(total(3, 4)).toBe(12);
});
```

Level: Freelancer · [More JavaScript terms at this level](https://www.ask-codey.com/glossary/subjects/javascript/freelancer)

Updated: September 27, 2026

## In other subjects

- [Unit Test in C#](https://www.ask-codey.com/glossary/unit-test-c-sharp)
- [Unit Test in Java](https://www.ask-codey.com/glossary/unit-test)
- [Unit Test in Unit Testing](https://www.ask-codey.com/glossary/unit-test-unit-testing)

Source: https://www.ask-codey.com/glossary/unit-test-javascript
