Skip to content

Commit

Permalink
fix notifier not exposing ownerDataMap
Browse files Browse the repository at this point in the history
  • Loading branch information
vzaidman committed Jan 18, 2025
1 parent f320386 commit 25b32e2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/getUpdateInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,6 @@ export default function getUpdateInfo({Component, displayName, hookName, prevOwn
nextState,
nextHookResult,
reason: getUpdateReason(prevOwner, prevProps, prevState, prevHookResult, nextOwner, nextProps, nextState, nextHookResult),
ownerDataMap: wdyrStore.ownerDataMap,
};
}
15 changes: 15 additions & 0 deletions tests/getUpdateInfo.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ describe('getUpdateInfo', () => {

expect(updateInfo).toEqual({
...input,
ownerDataMap: expect.any(WeakMap),
displayName: 'TestComponent',
reason: {
propsDifferences: [],
Expand All @@ -58,6 +59,7 @@ describe('getUpdateInfo', () => {

expect(updateInfo).toEqual({
...input,
ownerDataMap: expect.any(WeakMap),
displayName: 'TestComponent',
reason: {
propsDifferences: [],
Expand All @@ -82,6 +84,7 @@ describe('getUpdateInfo', () => {

expect(updateInfo).toEqual({
...input,
ownerDataMap: expect.any(WeakMap),
displayName: 'TestComponent',
reason: {
propsDifferences: [],
Expand All @@ -106,6 +109,7 @@ describe('getUpdateInfo', () => {

expect(updateInfo).toEqual({
...input,
ownerDataMap: expect.any(WeakMap),
displayName: 'TestComponent',
reason: {
propsDifferences: [],
Expand All @@ -131,6 +135,7 @@ describe('getUpdateInfo', () => {
expect(updateInfo).toEqual({
...input,
displayName: 'TestComponent',
ownerDataMap: expect.any(WeakMap),
reason: {
propsDifferences: [
{
Expand Down Expand Up @@ -162,6 +167,7 @@ describe('getUpdateInfo', () => {
expect(updateInfo).toEqual({
...input,
displayName: 'TestComponent',
ownerDataMap: expect.any(WeakMap),
reason: {
propsDifferences: [],
stateDifferences: [
Expand Down Expand Up @@ -193,6 +199,7 @@ describe('getUpdateInfo', () => {
expect(updateInfo).toEqual({
...input,
displayName: 'TestComponent',
ownerDataMap: expect.any(WeakMap),
reason: {
propsDifferences: [
{
Expand Down Expand Up @@ -231,6 +238,7 @@ describe('getUpdateInfo', () => {
expect(updateInfo).toEqual({
...input,
displayName: 'TestComponent',
ownerDataMap: expect.any(WeakMap),
reason: {
propsDifferences: [
{
Expand Down Expand Up @@ -264,6 +272,7 @@ describe('getUpdateInfo', () => {
expect(updateInfo).toEqual({
...input,
displayName: 'TestComponent',
ownerDataMap: expect.any(WeakMap),
reason: {
propsDifferences: [],
stateDifferences: [
Expand Down Expand Up @@ -297,6 +306,7 @@ describe('getUpdateInfo', () => {
expect(updateInfo).toEqual({
...input,
displayName: 'TestComponent',
ownerDataMap: expect.any(WeakMap),
reason: {
propsDifferences: [
{
Expand Down Expand Up @@ -335,6 +345,7 @@ describe('getUpdateInfo', () => {
expect(updateInfo).toEqual({
...input,
displayName: 'TestComponent',
ownerDataMap: expect.any(WeakMap),
reason: {
propsDifferences: [
{
Expand Down Expand Up @@ -366,6 +377,7 @@ describe('getUpdateInfo', () => {
expect(updateInfo).toEqual({
...input,
displayName: 'TestComponent',
ownerDataMap: expect.any(WeakMap),
reason: {
propsDifferences: [],
stateDifferences: [
Expand Down Expand Up @@ -397,6 +409,7 @@ describe('getUpdateInfo', () => {
expect(updateInfo).toEqual({
...input,
displayName: 'TestComponent',
ownerDataMap: expect.any(WeakMap),
reason: {
propsDifferences: [
{
Expand Down Expand Up @@ -435,6 +448,7 @@ describe('getUpdateInfo', () => {
expect(updateInfo).toEqual({
...input,
displayName: 'TestComponent',
ownerDataMap: expect.any(WeakMap),
reason: {
propsDifferences: [
{
Expand Down Expand Up @@ -489,6 +503,7 @@ describe('getUpdateInfo', () => {

expect(updateInfo).toEqual({
...input,
ownerDataMap: expect.any(WeakMap),
displayName: 'TestComponent',
reason: {
propsDifferences: [
Expand Down

0 comments on commit 25b32e2

Please sign in to comment.