Skip to content

Commit

Permalink
chore: update deps (#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
UziTech authored Dec 14, 2021
1 parent c9fa515 commit a862d40
Show file tree
Hide file tree
Showing 6 changed files with 830 additions and 798 deletions.
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@
},
"devDependencies": {
"@babel/cli": "^7.16.0",
"@babel/core": "^7.16.0",
"@babel/eslint-parser": "^7.16.3",
"@babel/preset-env": "^7.16.4",
"babel-jest": "^27.3.1",
"@babel/core": "^7.16.5",
"@babel/eslint-parser": "^7.16.5",
"@babel/preset-env": "^7.16.5",
"babel-jest": "^27.4.5",
"conventional-github-releaser": "^3.1.5",
"cross-env": "^7.0.3",
"eslint": "^8.3.0",
"eslint": "^8.4.1",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.3",
"express": "^4.17.1",
"husky": "^7.0.4",
"jest": "^27.3.1",
"jest": "^27.4.5",
"lerna": "^4.0.0",
"lint-staged": "^12.1.2",
"prettier": "^2.5.0",
"puppeteer": "^11.0.0",
"prettier": "^2.5.1",
"puppeteer": "^12.0.1",
"rimraf": "^3.0.2"
}
}
4 changes: 2 additions & 2 deletions packages/jest-dev-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"dependencies": {
"chalk": "^4.1.2",
"cwd": "^0.10.0",
"find-process": "^1.4.5",
"prompts": "^2.4.1",
"find-process": "^1.4.7",
"prompts": "^2.4.2",
"spawnd": "^6.0.2",
"tree-kill": "^1.2.2",
"wait-on": "^6.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-environment-puppeteer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"chalk": "^4.1.2",
"cwd": "^0.10.0",
"jest-dev-server": "^6.0.2",
"jest-environment-node": "^27.3.1",
"jest-environment-node": "^27.4.4",
"merge-deep": "^3.0.3"
}
}
2 changes: 1 addition & 1 deletion packages/jest-environment-puppeteer/src/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export async function setup(jestConfig = {}) {
process.env.BROWSERS_COUNT = browsersCount

let wsEndpoints = []
if(config.connect && config.connect.browserWSEndpoint) {
if (config.connect && config.connect.browserWSEndpoint) {
wsEndpoints = [config.connect.browserWSEndpoint]
} else {
browsers = await Promise.all(
Expand Down
11 changes: 6 additions & 5 deletions packages/jest-environment-puppeteer/tests/setup.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import puppeteer from 'puppeteer'
import { setup, teardown } from '../src/global'

describe('setup', () => {
describe('browserWSEndpoint in config connect' , () => {
describe('browserWSEndpoint in config connect', () => {
const connectSpy = jest.spyOn(puppeteer, 'connect')
beforeEach(() => {
process.env.JEST_PUPPETEER_CONFIG = path.resolve(
Expand All @@ -17,7 +17,7 @@ describe('setup', () => {
await setup()
expect(connectSpy).not.toHaveBeenCalled()
})

it('should set the ws-endpoint to the one provided in config', async () => {
await setup()
expect(process.env.BROWSERS_COUNT).toBe('1')
Expand All @@ -26,7 +26,7 @@ describe('setup', () => {
})
})

describe('browserWSEndpoint not in config connect' , () => {
describe('browserWSEndpoint not in config connect', () => {
const launchSpy = jest.spyOn(puppeteer, 'launch')
beforeEach(() => {
process.env.JEST_PUPPETEER_CONFIG = path.resolve(
Expand All @@ -42,12 +42,13 @@ describe('setup', () => {
await setup()
expect(launchSpy).toHaveBeenCalled()
})

it('should use ws-endpoint generated by launch or connect', async () => {
await setup()
expect(process.env.BROWSERS_COUNT).toBe('1')
const wsEndPoint = JSON.parse(process.env.PUPPETEER_WS_ENDPOINTS)[0]
const wsRegex = /^(ws):\/\/(127.0.0.1):(?<num>\d{4,5})(\/devtools\/browser\/)(.*)$/
const wsRegex =
/^(ws):\/\/(127.0.0.1):(?<num>\d{4,5})(\/devtools\/browser\/)(.*)$/
expect(wsEndPoint).toMatch(wsRegex)
})
})
Expand Down
Loading

0 comments on commit a862d40

Please sign in to comment.