Skip to content

Commit ca0dcc6

Browse files
chore(deps-dev): Bump jest from 26.6.3 to 29.7.0 (#1107)
* chore(deps-dev): Bump jest from 26.6.3 to 29.7.0 Bumps [jest](https://github.com/jestjs/jest/tree/HEAD/packages/jest) from 26.6.3 to 29.7.0. - [Release notes](https://github.com/jestjs/jest/releases) - [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/jestjs/jest/commits/v29.7.0/packages/jest) --- updated-dependencies: - dependency-name: jest dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * deps: Update for for jest 29 --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Benjamin Piouffle <[email protected]>
1 parent 49b5d2c commit ca0dcc6

File tree

12 files changed

+2857
-10905
lines changed

12 files changed

+2857
-10905
lines changed

app/components/Utils/__tests__/ReputationGuardTooltip.spec.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* @jest-environment jsdom
3+
*/
4+
15
import { t } from 'react-i18next'
26

37
import { ReputationGuardTooltip } from '../ReputationGuardTooltip'

app/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function boolFromConfig(value) {
1212
}
1313

1414
// Get the CF global config
15-
const globals = window.CF_GLOBALS || {}
15+
const globals = (typeof window !== 'undefined' && window.CF_GLOBALS) || {}
1616

1717
// Raw env export
1818
export const JS_ENV = globals['JS_ENV'] || process.env.JS_ENV

app/i18n/browser_locale.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ import { SUPPORTED_LOCALES } from '../constants'
22

33
// Util to get browser locale
44
const navigatorLocale = () => {
5+
if (typeof window === 'undefined') {
6+
return 'en'
7+
}
8+
59
return window.navigator.userLanguage || window.navigator.language || 'en'
610
}
711

app/lib/__tests__/url_utils.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* @jest-environment jsdom
3+
*/
4+
15
import { isExternal, optionsToQueryString, youtubeRegex } from '../url_utils'
26

37
describe('Youtube regex', () => {

app/state/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ const middlewares = [thunk, promiseMiddleware]
3737

3838
// If running in dev and browser has redux devtools extension activated, use it
3939
const getComposer = () => {
40-
if (JS_ENV === 'prod' || !window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) {
40+
if (
41+
JS_ENV === 'prod' ||
42+
typeof window === 'undefined' ||
43+
!window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
44+
) {
4145
return compose
4246
}
4347
return window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({

app/state/modals/__tests__/__snapshots__/reducer.spec.js.snap

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ exports[`should be able to add and remove modals 1`] = `Immutable.Stack []`;
44

55
exports[`should be able to add and remove modals 2`] = `
66
Immutable.Stack [
7-
Object {
8-
"Modal": Object {
7+
{
8+
"Modal": {
99
"$$typeof": Symbol(react.memo),
1010
"WrappedComponent": [Function],
1111
"compare": null,
1212
"type": [Function],
1313
},
14-
"props": Object {
14+
"props": {
1515
"hello": "world",
1616
"id": 1,
1717
},
@@ -21,26 +21,26 @@ Immutable.Stack [
2121

2222
exports[`should be able to add and remove modals 3`] = `
2323
Immutable.Stack [
24-
Object {
25-
"Modal": Object {
24+
{
25+
"Modal": {
2626
"$$typeof": Symbol(react.memo),
2727
"WrappedComponent": [Function],
2828
"compare": null,
2929
"type": [Function],
3030
},
31-
"props": Object {
31+
"props": {
3232
"hello": "world",
3333
"id": 2,
3434
},
3535
},
36-
Object {
37-
"Modal": Object {
36+
{
37+
"Modal": {
3838
"$$typeof": Symbol(react.memo),
3939
"WrappedComponent": [Function],
4040
"compare": null,
4141
"type": [Function],
4242
},
43-
"props": Object {
43+
"props": {
4444
"hello": "world",
4545
"id": 1,
4646
},
@@ -50,14 +50,14 @@ Immutable.Stack [
5050

5151
exports[`should be able to add and remove modals 4`] = `
5252
Immutable.Stack [
53-
Object {
54-
"Modal": Object {
53+
{
54+
"Modal": {
5555
"$$typeof": Symbol(react.memo),
5656
"WrappedComponent": [Function],
5757
"compare": null,
5858
"type": [Function],
5959
},
60-
"props": Object {
60+
"props": {
6161
"hello": "world",
6262
"id": 1,
6363
},

app/state/user_preferences/reducer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const setVideosFilter = createAction('USER_PREFERENCES/SET_VIDEOS_FILTER'
1515
export const toggleAutoscroll = createAction('STATEMENTS/TOGGLE_AUTOSCROLL')
1616
export const toggleBackgroundSound = createAction('STATEMENTS/TOGGLE_BACKGROUND_SOUND')
1717

18-
const isMobile = window.innerWidth <= MOBILE_WIDTH_THRESHOLD
18+
const isMobile = typeof window !== 'undefined' && window.innerWidth <= MOBILE_WIDTH_THRESHOLD
1919

2020
const Preferences = new Record({
2121
// Disable autoscroll and sidebar expended by default on mobile

app/state/video_debate/comments/__tests__/__snapshots__/reducer.spec.js.snap

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ Immutable.Record {
8484
"id": 739,
8585
"reply_to_id": null,
8686
"is_reported": false,
87-
"user": Object {
88-
"achievements": Array [
87+
"user": {
88+
"achievements": [
8989
4,
9090
3,
9191
6,
@@ -101,7 +101,7 @@ Immutable.Record {
101101
"speaker_id": null,
102102
"username": "Betree",
103103
},
104-
"source": Object {
104+
"source": {
105105
"language": null,
106106
"site_name": "www.lejdc.fr",
107107
"title": "Sur décision de justice - Alexandre Bain retrouve l'appellation pouilly-fumé",
@@ -117,8 +117,8 @@ Immutable.Record {
117117
"id": 737,
118118
"reply_to_id": null,
119119
"is_reported": false,
120-
"user": Object {
121-
"achievements": Array [
120+
"user": {
121+
"achievements": [
122122
4,
123123
3,
124124
6,
@@ -134,14 +134,14 @@ Immutable.Record {
134134
"speaker_id": null,
135135
"username": "Betree",
136136
},
137-
"source": Object {
137+
"source": {
138138
"language": "fr",
139139
"site_name": "FIGARO",
140140
"title": "La justice rend son AOC pouilly-fumé à un vigneron abusivement sanctionné",
141141
"url": "http://www.lefigaro.fr/societes/2017/05/28/20005-20170528ARTFIG00185-la-justice-rend-son-aoc-pouilly-fume-a-un-vigneron-abusivement-sanctionne.php",
142142
},
143143
"statement_id": 297,
144-
"text": "Si l'AOC lui avait bien été retirée (et rendue depuis) la raison invoquée par le Figaro qui cite l'INAO est ailleurs : \\"plusieurs rendez-vous manqués, mais pour des raisons justifiées, avec l'Organisme d'inspection des vins du Centre\\"",
144+
"text": "Si l'AOC lui avait bien été retirée (et rendue depuis) la raison invoquée par le Figaro qui cite l'INAO est ailleurs : "plusieurs rendez-vous manqués, mais pour des raisons justifiées, avec l'Organisme d'inspection des vins du Centre"",
145145
"approve": false,
146146
"inserted_at": 2018-03-13T16:55:07.288Z,
147147
"score": 2,
@@ -150,8 +150,8 @@ Immutable.Record {
150150
"id": 917,
151151
"reply_to_id": null,
152152
"is_reported": false,
153-
"user": Object {
154-
"achievements": Array [
153+
"user": {
154+
"achievements": [
155155
4,
156156
3,
157157
6,
@@ -180,8 +180,8 @@ Immutable.Record {
180180
"id": 774,
181181
"reply_to_id": null,
182182
"is_reported": false,
183-
"user": Object {
184-
"achievements": Array [
183+
"user": {
184+
"achievements": [
185185
6,
186186
3,
187187
8,
@@ -200,7 +200,7 @@ Immutable.Record {
200200
"speaker_id": null,
201201
"username": "tad2018",
202202
},
203-
"source": Object {
203+
"source": {
204204
"language": null,
205205
"site_name": null,
206206
"title": "Planetoscope - Statistiques : Consommation de pesticides phytosanitaires en France",
@@ -220,8 +220,8 @@ Immutable.Record {
220220
"id": 738,
221221
"reply_to_id": 737,
222222
"is_reported": false,
223-
"user": Object {
224-
"achievements": Array [
223+
"user": {
224+
"achievements": [
225225
4,
226226
3,
227227
6,
@@ -239,7 +239,7 @@ Immutable.Record {
239239
},
240240
"source": null,
241241
"statement_id": 297,
242-
"text": "\\"l'Inao (Institut national de l'origine et de la qualité) a considéré que le viticulteur refusait de se soumettre à un contrôle obligatoire et a décidé, en 2015, de lui retirer son AOC.\\"",
242+
"text": ""l'Inao (Institut national de l'origine et de la qualité) a considéré que le viticulteur refusait de se soumettre à un contrôle obligatoire et a décidé, en 2015, de lui retirer son AOC."",
243243
"approve": null,
244244
"inserted_at": 2018-03-13T16:55:49.045Z,
245245
"score": 2,
@@ -250,8 +250,8 @@ Immutable.Record {
250250
"id": 778,
251251
"reply_to_id": 775,
252252
"is_reported": false,
253-
"user": Object {
254-
"achievements": Array [
253+
"user": {
254+
"achievements": [
255255
4,
256256
3,
257257
6,
@@ -280,8 +280,8 @@ Immutable.Record {
280280
"id": 775,
281281
"reply_to_id": 739,
282282
"is_reported": false,
283-
"user": Object {
284-
"achievements": Array [
283+
"user": {
284+
"achievements": [
285285
6,
286286
3,
287287
8,
@@ -313,8 +313,8 @@ Immutable.Record {
313313
"id": 809,
314314
"reply_to_id": 778,
315315
"is_reported": false,
316-
"user": Object {
317-
"achievements": Array [
316+
"user": {
317+
"achievements": [
318318
6,
319319
3,
320320
8,

app/state/video_debate/presence/__tests__/__snapshots__/reducer.spec.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ Immutable.Record {
5757

5858
exports[`set presence 2`] = `
5959
Immutable.Record {
60-
"viewers": Object {
60+
"viewers": {
6161
"count": 42,
6262
},
63-
"users": Object {
63+
"users": {
6464
"count": 5,
6565
},
6666
}

app/state/video_debate/video/__tests__/__snapshots__/reducer.spec.js.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,17 +211,17 @@ Immutable.Record {
211211
"player": "youtube",
212212
"offset": 0,
213213
"playback": Immutable.Record {
214-
"position": Object {
215-
"forcedPosition": Object {
214+
"position": {
215+
"forcedPosition": {
216216
"requestId": 1,
217217
"time": 0,
218218
},
219219
"position": 4,
220220
},
221221
"forcedPosition": Immutable.Record {
222222
"requestId": "A-UNIQUE-UUID",
223-
"time": Object {
224-
"forcedPosition": Object {
223+
"time": {
224+
"forcedPosition": {
225225
"requestId": 1,
226226
"time": 0,
227227
},

0 commit comments

Comments
 (0)