Skip to content

Commit df05386

Browse files
build(deps-dev): bump @types/jest from 27.5.2 to 29.5.12 (#273)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 27.5.2 to 29.5.12. <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@types/jest&package-manager=npm_and_yarn&previous-version=27.5.2&new-version=29.5.12)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) You can trigger a rebase of this PR by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> > **Note** > Automatic rebases have been disabled on this pull request as it has been open for over 30 days. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com>
1 parent 1cfd666 commit df05386

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"@testing-library/jest-dom": "^6.4.8",
5555
"@testing-library/react": "^15.0.7",
5656
"@types/hoist-non-react-statics": "^3.3.1",
57-
"@types/jest": "^27.5.2",
57+
"@types/jest": "^29.5.12",
5858
"@types/lodash.camelcase": "^4.3.6",
5959
"@types/node": "^20.12.12",
6060
"@types/prop-types": "^15.7.4",

src/provider.test.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ describe('LDProvider', () => {
216216
const mockSetState = jest.spyOn(instance, 'setState');
217217

218218
await instance?.componentDidMount();
219-
const setStateFunction = mockSetState.mock.lastCall[0] as (p: ProviderState) => ProviderState;
219+
const setStateFunction = mockSetState.mock?.lastCall?.[0] as (p: ProviderState) => ProviderState;
220220

221221
expect(mockInitialize).toHaveBeenCalledWith(clientSideID, context, options);
222222
expect(setStateFunction(previousState)).toEqual({
@@ -240,7 +240,7 @@ describe('LDProvider', () => {
240240
const mockSetState = jest.spyOn(instance, 'setState');
241241

242242
await instance?.componentDidMount();
243-
const setStateFunction = mockSetState.mock.lastCall[0] as (p: ProviderState) => ProviderState;
243+
const setStateFunction = mockSetState.mock?.lastCall?.[0] as (p: ProviderState) => ProviderState;
244244

245245
expect(mockLDClient.on).toHaveBeenCalledWith('failed', expect.any(Function));
246246
expect(mockLDClient.on).toHaveBeenCalledWith('ready', expect.any(Function));
@@ -260,7 +260,7 @@ describe('LDProvider', () => {
260260
const mockSetState = jest.spyOn(instance, 'setState');
261261

262262
await instance?.componentDidMount();
263-
const setStateFunction = mockSetState.mock.lastCall[0] as (p: ProviderState) => ProviderState;
263+
const setStateFunction = mockSetState.mock?.lastCall?.[0] as (p: ProviderState) => ProviderState;
264264

265265
expect(mockLDClient.on).not.toHaveBeenCalledWith('failed', expect.any(Function));
266266
expect(mockLDClient.on).not.toHaveBeenCalledWith('ready', expect.any(Function));
@@ -390,7 +390,7 @@ describe('LDProvider', () => {
390390
const mockSetState = jest.spyOn(instance, 'setState');
391391

392392
await instance.componentDidMount();
393-
const setStateFunction = mockSetState.mock.lastCall[0] as (p: ProviderState) => ProviderState;
393+
const setStateFunction = mockSetState.mock?.lastCall?.[0] as (p: ProviderState) => ProviderState;
394394

395395
expect(mockInitialize).toHaveBeenCalledWith(clientSideID, context, options);
396396
expect(setStateFunction(previousState)).toEqual({
@@ -412,7 +412,7 @@ describe('LDProvider', () => {
412412
const mockSetState = jest.spyOn(instance, 'setState');
413413

414414
await instance.componentDidMount();
415-
const setStateFunction = mockSetState.mock.lastCall[0] as (p: ProviderState) => ProviderState;
415+
const setStateFunction = mockSetState.mock?.lastCall?.[0] as (p: ProviderState) => ProviderState;
416416

417417
expect(setStateFunction(previousState)).toEqual({
418418
flags: { testFlag: true, anotherTestFlag: true },
@@ -450,7 +450,7 @@ describe('LDProvider', () => {
450450
const mockSetState = jest.spyOn(instance, 'setState');
451451

452452
await instance.componentDidMount();
453-
const setStateFunction = mockSetState.mock.lastCall[0] as (p: ProviderState) => ProviderState;
453+
const setStateFunction = mockSetState.mock?.lastCall?.[0] as (p: ProviderState) => ProviderState;
454454

455455
expect(mockLDClient.on).toHaveBeenCalledWith('change', expect.any(Function));
456456
expect(setStateFunction(previousState)).toEqual({
@@ -474,7 +474,7 @@ describe('LDProvider', () => {
474474
const mockSetState = jest.spyOn(instance, 'setState');
475475

476476
await instance.componentDidMount();
477-
const setStateFunction = mockSetState.mock.lastCall[0] as (p: ProviderState) => ProviderState;
477+
const setStateFunction = mockSetState.mock?.lastCall?.[0] as (p: ProviderState) => ProviderState;
478478

479479
expect(mockLDClient.on).toHaveBeenCalledWith('change', expect.any(Function));
480480
expect(setStateFunction(previousState)).toEqual({
@@ -531,7 +531,7 @@ describe('LDProvider', () => {
531531
const mockSetState = jest.spyOn(instance, 'setState');
532532

533533
await instance.componentDidMount();
534-
const setStateFunction = mockSetState.mock.lastCall[0] as (p: ProviderState) => ProviderState;
534+
const setStateFunction = mockSetState.mock?.lastCall?.[0] as (p: ProviderState) => ProviderState;
535535

536536
expect(setStateFunction(previousState)).toEqual({
537537
flags: { testFlag: 3 },

src/withLDProvider.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ describe('withLDProvider', () => {
8686
const mockSetState = jest.spyOn(instance, 'setState');
8787

8888
await instance.componentDidMount();
89-
const setStateFunction = mockSetState.mock.lastCall[0] as (p: ProviderState) => ProviderState;
89+
const setStateFunction = mockSetState.mock?.lastCall?.[0] as (p: ProviderState) => ProviderState;
9090

9191
expect(mockInitialize).toHaveBeenCalledWith(clientSideID, context, options);
9292
expect(setStateFunction(previousState)).toEqual({
@@ -103,7 +103,7 @@ describe('withLDProvider', () => {
103103
const mockSetState = jest.spyOn(instance, 'setState');
104104

105105
await instance.componentDidMount();
106-
const setStateFunction = mockSetState.mock.lastCall[0] as (p: ProviderState) => ProviderState;
106+
const setStateFunction = mockSetState.mock?.lastCall?.[0] as (p: ProviderState) => ProviderState;
107107

108108
expect(setStateFunction(previousState)).toEqual({
109109
flags: { testFlag: true, anotherTestFlag: true },
@@ -131,7 +131,7 @@ describe('withLDProvider', () => {
131131
const mockSetState = jest.spyOn(instance, 'setState');
132132

133133
await instance.componentDidMount();
134-
const setStateFunction = mockSetState.mock.lastCall[0] as (p: ProviderState) => ProviderState;
134+
const setStateFunction = mockSetState.mock?.lastCall?.[0] as (p: ProviderState) => ProviderState;
135135

136136
expect(mockLDClient.on).toHaveBeenCalledWith('change', expect.any(Function));
137137
expect(setStateFunction(previousState)).toEqual({
@@ -150,7 +150,7 @@ describe('withLDProvider', () => {
150150
const mockSetState = jest.spyOn(instance, 'setState');
151151

152152
await instance.componentDidMount();
153-
const setStateFunction = mockSetState.mock.lastCall[0] as (p: ProviderState) => ProviderState;
153+
const setStateFunction = mockSetState.mock?.lastCall?.[0] as (p: ProviderState) => ProviderState;
154154

155155
expect(mockLDClient.on).toHaveBeenCalledWith('change', expect.any(Function));
156156
expect(setStateFunction(previousState)).toEqual({

0 commit comments

Comments
 (0)