Skip to content

Added more plugin tests#1969

Merged
RunDevelopment merged 18 commits intoPrismJS:masterfrom
RunDevelopment:more-plugin-tests
Oct 5, 2021
Merged

Added more plugin tests#1969
RunDevelopment merged 18 commits intoPrismJS:masterfrom
RunDevelopment:more-plugin-tests

Conversation

@RunDevelopment
Copy link
Copy Markdown
Member

@RunDevelopment RunDevelopment commented Jul 11, 2019

This adds more plugin tests and a new way to create Prism instances inside a JSDOM VM.

It also fixes that Copy to Clipboard did not update the copied text if the text of the code element changed.
This can technically be seen as a fix for #1965.


Also, I just named the tests files basic-functionality for lack of a better name. Suggestions for a better pattern are very welcome.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 1, 2021

No JS Changes

Generated by 🚫 dangerJS against df8ee50

@RunDevelopment
Copy link
Copy Markdown
Member Author

RunDevelopment commented Oct 1, 2021

Shit, I forgot about this.

I resolved the merge conflicts and addressed all review comments.

I fixed the usage of after by adding a util function called createScopedPrismDom. The idea is that this function creates a Prism DOM and registers a cleanup function for the DOM. It's called reusable because the DOM instance is intended to be used by multiple it tests.

I also updated JSDom. JSDom 16 added support for createRange which drastically simplifies Keep Markup tests.

@RunDevelopment
Copy link
Copy Markdown
Member Author

I will merge this now because I want to implement update #2640 and this PR will cause conflicts.

@RunDevelopment RunDevelopment merged commit a394a14 into PrismJS:master Oct 5, 2021
@RunDevelopment RunDevelopment deleted the more-plugin-tests branch October 5, 2021 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants