---
title: "Discussion on \"Pure functions and basic tests in Jasmine\" | Hashnode"
description: "Discussion on \"Pure functions and basic tests in Jasmine\". Pure functions are the perfect case for unit testing. For a given input, we always expect the same output—there is no internal state involved. Let’s take a look at a few examples and some simple tests that check if the methods work as expected.\nJasmi..."
url: "https://hashnode.com/posts/pure-functions-and-basic-tests-in-jasmine/65c5545e7803650f4c98ac25"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Pure functions and basic tests in Jasmine](https://how-to.dev/pure-functions-and-basic-tests-in-jasmine?utm_source=hashnode&utm_medium=feed)

Pure functions are the perfect case for unit testing. For a given input, we always expect the same output—there is no internal state involved. Let’s take a look at a few examples and some simple tests that check if the methods work as expected. Jasmi...

Feb 8, 2024 · 5 min read · how-to.dev  
Read the article

-   [#testing](https://hashnode.com/tag/testing)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#jasmine](https://hashnode.com/tag/jasmine)
-   [#beginners](https://hashnode.com/tag/beginners)

## Written by

[Marcin Wosinek](https://hashnode.com/@marcin-wosinek)

@marcin-wosinek · Valencia, Spain

  
[View profile](https://hashnode.com/@marcin-wosinek)

JavaScript developer

I'm JS developer with 13 years of professional experience. I'm always happy to teach my craft.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
