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

Fix for jest@27 #15

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ A jest transform to facilitate testing clientside implementations within the qub
"test": "jest --coverage"
},
"jest": {
"testEnvironment": "jsdom",
"transform": {
".*(.js|.css|.less)$": "@qubit/jest"
},
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = {
function transformJs (src) {
return buble.transform(src, {
transforms: {
asyncAwait: false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is a good idea because it will make people think they can use async await in their code which they cannot yet

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I was thinking that. It is necessary for jest@27 and makes the argument for pinning to v26 stronger

dangerousForOf: true,
dangerousTaggedTemplateString: true
},
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
},
"transformIgnorePatterns": []
},
"healthier": {
"globals": [
"jest"
]
},
"devDependencies": {
"@qubit/utils": "^1.1.0",
"healthier": "^4.0.0",
Expand Down
1 change: 0 additions & 1 deletion setup/placement.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* istanbul ignore file */
const { jest } = require('@jest/globals')
const Promise = require('sync-p/extra')
const getBrowserState = require('@qubit/jolt/lib/getBrowserState')
const addStylesheet = require('@qubit/add-stylesheet')
Expand Down