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

Mock queueMicrotask in unit tests #314

Merged
merged 4 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "Update jest to support queueMircotask"
This reverts commit a043c85.
  • Loading branch information
dk981234 committed Apr 22, 2024
commit b7415be96092d99a963fee2afeeb90d0d0e4a994
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"survey-core": "latest"
},
"devDependencies": {
"@types/jest": "^25.1.5",
"@types/jest": "^23.3.3",
"@types/lodash": "4.14.121",
"@types/node": "7.0.4",
"@typescript-eslint/eslint-plugin": "^4.31.0",
Expand All @@ -37,13 +37,13 @@
"eslint": "^7.32.0",
"generate-json-webpack-plugin": "0.2.1",
"husky": "^2.7.0",
"jest": "^25.2.7",
"jest": "^23.6.0",
"jest-junit": "^16.0.0",
"live-server": "^1.2.2",
"rimraf": "2.5.4",
"standard-version": "^8.0.1",
"surveyjs-doc-generator": "git+https://github.com/surveyjs/surveyjs-doc-generator.git",
"ts-jest": "^25.2.7",
"ts-jest": "^23.10.3",
"ts-loader": "2.3.4",
"typescript": "^4.2.2",
"webpack": "2.2.1",
Expand Down
3 changes: 0 additions & 3 deletions tests/flat_signaturepad.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ test('Check signaturepad', async () => {

test('Check signaturepad with backgroundImage', async () => {
SurveyHelper.shouldConvertImageToPng = false;
const oldXMLSerializer = window.XMLSerializer;
window.XMLSerializer = undefined as any;
let json: any = {
questions: [
{
Expand Down Expand Up @@ -87,5 +85,4 @@ test('Check signaturepad with backgroundImage', async () => {
TestHelper.equalRect(expect, htmlBrick, assumeHTML);
TestHelper.equalRect(expect, backgroundImageBrick, assumeHTML);
SurveyHelper.shouldConvertImageToPng = true;
window.XMLSerializer = oldXMLSerializer
});