Jasmine: A Beginner-Friendly Guide on Pure Functions and Basic Tests
2024-2-12 02:0:2 Author: hackernoon.com(查看原文) 阅读量:16 收藏

Hackernoon logo

Jasmine: A Beginner-Friendly Guide on Pure Functions and Basic Tests by@marcinwosinek

Too Long; Didn't Read

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.

featured image - Jasmine: A Beginner-Friendly Guide on Pure Functions and Basic Tests

Marcin Wosinek HackerNoon profile picture


@marcinwosinek

Marcin Wosinek


I'm a JavaScript developer. I'm here to teach you useful skills, so you can succeed in your work & private projects.


Receive Stories from @marcinwosinek

react to story with heart

RELATED STORIES

Article Thumbnail

Article Thumbnail

Article Thumbnail

Article Thumbnail

Article Thumbnail

L O A D I N G
. . . comments & more!


文章来源: https://hackernoon.com/jasmine-a-beginner-friendly-guide-on-pure-functions-and-basic-tests?source=rss
如有侵权请联系:admin#unsafe.sh