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

Fix float expectation example #262

Merged
merged 1 commit into from
Mar 22, 2024
Merged

Conversation

benjaminhaeberli
Copy link
Contributor

I saw rominronin reported this error on Discord and you asked a PR to fix it in February, but he didn't make it, so I'm here :)

On writing tests page, the float example is wrong, so I fixed it :

describe('sum', function () {
   it('may sum integers', function () {
       $result = sum(1, 2);
 
       expect($result)->toBe(3);
    });
 
    it('may sum floats', function () {
       $result = sum(1.5, 2.5);
 
-      expect($result)->toBe(4);
+      expect($result)->toBe(4.0);
    });
});

@benjaminhaeberli benjaminhaeberli changed the title docs: fix float expectation Fix float expectation example Mar 21, 2024
@owenvoke owenvoke merged commit 6d448e8 into pestphp:master Mar 22, 2024
1 check passed
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.

2 participants