Skip to content

Commit

Permalink
refactor: update jest dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Oct 27, 2022
1 parent 1300dc0 commit a7ced65
Show file tree
Hide file tree
Showing 5 changed files with 393 additions and 381 deletions.
14 changes: 8 additions & 6 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import type { Config } from '@jest/types'
import path from 'path'

export default (rootDir: string): Config.InitialOptions => {
return {
rootDir,
globals: {
'ts-jest': {
'diagnostics': true,
'isolatedModules': true,
},
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
'diagnostics': true,
'isolatedModules': true,
},
],
},
preset: 'ts-jest/presets/default',
testEnvironment: 'node',
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,22 @@
},
"devDependencies": {
"@changesets/cli": "latest",
"@jest/types": "28.1.3",
"@jest/types": "29.1.2",
"@svitejs/changesets-changelog-github-compact": "latest",
"@types/jest": "28.1.8",
"@types/node": "12",
"@types/jest": "29.0.3",
"@types/node": "14",
"c8": "latest",
"finepack": "latest",
"git-authors-cli": "latest",
"jest": "28.1.3",
"jest": "29.0.3",
"jest-watch-typeahead": "2.2.0",
"nano-staged": "latest",
"prettier": "latest",
"simple-git-hooks": "latest",
"ts-jest": "28.0.8",
"ts-node": "10.8.1",
"ts-jest": "29.0.3",
"ts-node": "10.9.1",
"turbo": "latest",
"typescript": "4.8.4"
"typescript": "latest"
},
"engines": {
"node": ">=14"
Expand Down
1 change: 1 addition & 0 deletions packages/vm/jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
global.AbortSignal = require('./packages/primitives/dist/abort-controller').AbortSignal
8 changes: 4 additions & 4 deletions packages/vm/tests/integration/body.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,19 @@ test('allows to read a FormData body as text', async () => {
expect(text.replace(/formdata-undici-0\.\d+/g, 'formdata-unidici-0.1234'))
.toMatchInlineSnapshot(`
"------formdata-unidici-0.1234
Content-Disposition: form-data; name=\\"name\\"
Content-Disposition: form-data; name="name"
John
------formdata-unidici-0.1234
Content-Disposition: form-data; name=\\"lastname\\"
Content-Disposition: form-data; name="lastname"
Doe
------formdata-unidici-0.1234
Content-Disposition: form-data; name=\\"metadata\\"; filename=\\"blob\\"
Content-Disposition: form-data; name="metadata"; filename="blob"
Content-Type: application/json
{
\\"hello\\": \\"world\\"
"hello": "world"
}
------formdata-unidici-0.1234--"
`)
Expand Down
Loading

0 comments on commit a7ced65

Please sign in to comment.