Skip to content

Commit

Permalink
fix: tests for email and emoji validations (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
exaby73 authored Jun 1, 2024
1 parent 443e45f commit 8af53ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ void main() {
});

test('should return false when value is not a valid email', () {
final result = l.string().email().validateValue('user');
final result = l.string().email().validateValue('hello user@example.com');

switch (result) {
case SingleValidationSuccess(data: _):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import 'package:test/test.dart';

void main() {
test('should return true when value is a valid emoji', () {
final result = l.string().emoji().validateValue('👍');
final result = l.string().emoji().validateValue('👍👍👍');

switch (result) {
case SingleValidationSuccess(data: _):
expect(result.data, '👍');
expect(result.data, '👍👍👍');
case SingleValidationError(data: _, errors: _):
fail('should not have errors');
}
Expand Down

0 comments on commit 8af53ba

Please sign in to comment.