-
-
Notifications
You must be signed in to change notification settings - Fork 53
Better support for custom directives #825
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: main
Are you sure you want to change the base?
Conversation
* Add support for directives without arguments like `@required()` * Add support for custom directive mapping Closes Code-Hex#422, Code-Hex#781
describe('formatDirectiveObjectArguments', () => { | ||
const cases: { | ||
name: string | ||
arg: DirectiveObjectArguments | ||
want: FormattedDirectiveObjectArguments | ||
}[] = [ | ||
{ | ||
name: 'normal', | ||
arg: { | ||
uri: 'url', | ||
email: 'email', | ||
}, | ||
want: { | ||
uri: ['url', '$2'], | ||
email: ['email', '$2'], | ||
}, | ||
}, | ||
{ | ||
name: 'contains array', | ||
arg: { | ||
startWith: ['matches', '/^$2/'], | ||
email: 'email', | ||
}, | ||
want: { | ||
startWith: ['matches', '/^$2/'], | ||
email: ['email', '$2'], | ||
}, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is important to maintain backward compatibility. Where have these test cases gone? I would like to see them restored if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the direction is good and it would be helpful if you could respond to the comments.
@required()
Closes #422 , #781