chore: update jest (#315)

This commit is contained in:
Nolan Lawson 2023-01-22 10:05:56 -08:00 committed by GitHub
parent 56bb784db1
commit fea4cd130e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1260 additions and 857 deletions

View File

@ -6,6 +6,9 @@ import { ResizeObserver } from 'd2l-resize-aware/resize-observer-module.js'
import { deleteDatabase } from '../src/database/databaseLifecycle'
import styles from '../node_modules/.cache/emoji-picker-element/styles.js'
// See https://github.com/jsdom/jsdom/issues/3455#issuecomment-1333567714
global.crypto.subtle = new Crypto().subtle
if (!global.performance) {
global.performance = {}
}
@ -21,7 +24,6 @@ jest.setTimeout(60000)
global.fetch = require('node-fetch')
global.Response = fetch.Response
global.crypto = new Crypto()
global.ResizeObserver = ResizeObserver
process.env.NODE_ENV = 'test'

View File

@ -74,7 +74,7 @@
},
"devDependencies": {
"@babel/preset-env": "^7.16.11",
"@peculiar/webcrypto": "^1.2.3",
"@peculiar/webcrypto": "^1.4.1",
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-node-resolve": "^13.1.3",
"@rollup/plugin-replace": "^3.1.0",
@ -82,7 +82,7 @@
"@testing-library/dom": "^8.11.3",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/user-event": "^13.5.0",
"babel-jest": "^27.5.1",
"babel-jest": "^29.3.1",
"blob-util": "^2.0.2",
"compression": "^1.7.4",
"conventional-changelog-cli": "^2.2.2",
@ -98,7 +98,8 @@
"focus-visible": "^5.2.0",
"get-folder-size": "^3.1.0",
"husky": "^7.0.0",
"jest": "^27.5.1",
"jest": "^29.3.1",
"jest-environment-jsdom": "^29.3.1",
"lint-staged": "^12.3.4",
"lodash-es": "^4.17.15",
"markdown-table": "^3.0.2",

View File

@ -47,8 +47,9 @@ describe('Custom emojis tests', () => {
expect(container.querySelector('.category').textContent).toEqual('Custom')
expect(container.querySelector('.category')).toHaveClass('gone')
await tick(40)
document.body.removeChild(picker)
await tick(20)
await tick(40)
})
test('Setting custom emoji, selecting flags, unsetting custom emoji', async () => {
@ -83,8 +84,9 @@ describe('Custom emojis tests', () => {
expect(getByRole(container, 'tab', { name: 'Flags' }).getAttribute('aria-selected')).toEqual('true')
await tick(40)
document.body.removeChild(picker)
await tick(20)
await tick(40)
})
test('Setting custom emoji, unsetting custom emoji', async () => {
@ -115,7 +117,8 @@ describe('Custom emojis tests', () => {
expect(getByRole(container, 'tab', { name: 'Smileys and emoticons' }).getAttribute('aria-selected')).toEqual('true')
await tick(40)
document.body.removeChild(picker)
await tick(20)
await tick(40)
})
})

2097
yarn.lock

File diff suppressed because it is too large Load Diff