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

There should be a way to check CKEditorError with parameters #4860

Closed
Reinmar opened this issue Mar 10, 2016 · 5 comments
Closed

There should be a way to check CKEditorError with parameters #4860

Reinmar opened this issue Mar 10, 2016 · 5 comments
Assignees
Labels
intro Good first ticket. package:utils resolution:invalid This issue is invalid (e.g. reports a non-existent bug or a by-design behavior). type:feature This issue reports a feature request (an idea for a new functionality or a missing option).

Comments

@Reinmar
Copy link
Member

Reinmar commented Mar 10, 2016

Moved from https://github.com/ckeditor/ckeditor5-core/issues/68

@pjasiun pjasiun closed this as completed Aug 5, 2016
@Reinmar
Copy link
Member Author

Reinmar commented Aug 18, 2016

Turns out this will be needed because of compatibility with ES5: https://github.com/ckeditor/ckeditor5-dev-compiler/issues/18#issuecomment-240718336.

@Reinmar
Copy link
Member Author

Reinmar commented Aug 18, 2016

We've been originally thinking about extending Chai by adding expect().to.throwCKEditorError(). I'm a bit afraid of doing this, but otherwise, we'll not be able to use this function at all.

I was also thinking about adding isCKEditorError( err, [ msgPattern ] ) function (and exporting it) to the utils/ckeditorerror module. This function will then be usable in the dev code. The Chai's extension would of course use this function.

@maxbarnas
Copy link
Contributor

I've added static method isCKEditorMethod to utils/ckeditorerror. This implementation is still not valid in code transpiled to ES5.

@Reinmar
Copy link
Member Author

Reinmar commented Aug 19, 2016

I've added static method isCKEditorMethod to utils/ckeditorerror. This implementation is still not valid in code transpiled to ES5.

Could you put it on review?

@maxbarnas
Copy link
Contributor

I set this as invalid because of problems with Chai extension in bundles. We'll use Babel plugin, that allows to extend builtin types - this will make instanceof usable again.

@mlewand mlewand transferred this issue from ckeditor/ckeditor5-utils Oct 9, 2019
@mlewand mlewand added intro Good first ticket. resolution:invalid This issue is invalid (e.g. reports a non-existent bug or a by-design behavior). type:feature This issue reports a feature request (an idea for a new functionality or a missing option). package:utils labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
intro Good first ticket. package:utils resolution:invalid This issue is invalid (e.g. reports a non-existent bug or a by-design behavior). type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

No branches or pull requests

4 participants