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

[TestGru] Add unit test for src/utils/string.ts #4

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

gru-agent[bot]
Copy link

@gru-agent gru-agent bot commented Jan 24, 2025

Trigger Info

Trigger Type Triggered By Source File Assignment
Manual zthreefires src/utils/string.ts Detail

Summary

This PR introduces unit tests for the toSnakeCase and isObject utility functions in the string module. Below is a summary of the changes:

Added Tests for toSnakeCase

  • Verifies conversion of space-separated strings to snake case.

  • Handles strings with multiple spaces.

  • Tests behavior with empty strings.

  • Ensures mixed-case strings are converted to lowercase.

  • Handles strings containing special characters.

Added Tests for isObject

  • Confirms true is returned for plain objects and arrays.

  • Validates false is returned for null, undefined, and primitive values.

  • Ensures true is returned for class instances.

These tests aim to improve the reliability and correctness of the utility functions.

Tip

You can @gru-agent and leave your feedback. TestGru will make adjustments based on your input

Tip

You can @gru-agent rebase to rebase the PR.

Tip

You can @gru-agent redo to reset or rebase before redoing the PR.

Tip

To modify the test code yourself, click here Edit Test Code

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.

1 participant