[e18e]: Replace lodash/merge
& lodash/mergeWith
with an alternative
#39790
Annotations
5 errors
src/manager-api/tests/stories.test.ts > stories API > v2 SET_STORIES event > normalizes parameters and calls setRef for external stories:
code/core/src/manager-api/tests/stories.test.ts#L1169
AssertionError: expected "spy" to be called with arguments: [ 'ref', { id: 'ref', …(1) }, true ]
Received:
1st spy call:
Array [
"ref",
Object {
"id": "ref",
"setStoriesData": Object {
"a--1": Object {
"kind": "a",
- "parameters": Object {
- "global": "global",
- "kind": "kind",
- "story": "story",
- },
+ "parameters": Object {},
},
},
},
true,
]
Number of calls: 1
❯ src/manager-api/tests/stories.test.ts:1169:30
|
src/preview-api/modules/preview-web/PreviewWeb.test.ts > PreviewWeb > onStoriesChanged > when the current story changes > emits STORY_PREPARED with new annotations:
code/core/src/preview-api/modules/preview-web/PreviewWeb.test.ts#L2830
AssertionError: expected "bound emit" to be called with arguments: [ 'storyPrepared', …(1) ]
Received:
1st bound emit call:
Array [
- "storyPrepared",
+ "storyRenderPhaseChanged",
Object {
- "argTypes": Object {
- "foo": Object {
- "name": "foo",
- "type": Object {
- "name": "string",
- },
- },
- "one": Object {
- "mapping": Object {
- "1": "mapped-1",
- },
- "name": "one",
- "type": Object {
- "name": "string",
- },
- },
- },
- "args": Object {
- "foo": "edited",
- "one": 1,
- },
- "id": "component-one--a",
- "initialArgs": Object {
- "foo": "edited",
- "one": 1,
- },
- "parameters": Object {
- "__isArgsStory": false,
- "docs": Any<Object>,
- "fileName": "./src/ComponentOne.stories.js",
- },
+ "newPhase": "preparing",
+ "storyId": "component-one--a",
},
]
2nd bound emit call:
Array [
"storyPrepared",
Object {
"argTypes": Object {
"foo": Object {
"name": "foo",
"type": Object {
"name": "string",
},
},
"one": Object {
"mapping": Object {
"1": "mapped-1",
},
"name": "one",
"type": Object {
"name": "string",
},
},
},
"args": Object {
- "foo": "edited",
+ "foo": "a",
"one": 1,
},
"id": "component-one--a",
"initialArgs": Object {
- "foo": "edited",
+ "foo": "a",
"one": 1,
},
"parameters": Object {
"__isArgsStory": false,
- "docs": Any<Object>,
+ "docs": Object {
+ "container": [Function spy],
+ "page": [Function spy],
+ "renderer": [Function renderer],
+ },
"fileName": "./src/ComponentOne.stories.js",
},
},
]
3rd bound emit call:
Array [
- "storyPrepared",
+ "storyRenderPhaseChanged",
Object {
- "argTypes": Object {
- "foo": Object {
- "name": "foo",
- "type": Object {
- "name": "string",
- },
- },
- "one": Object {
- "mapping": Object {
- "1": "mapped-1",
- },
- "name": "one",
- "type": Object {
- "name": "string",
- },
- },
- },
- "args": Object {
- "foo": "edited",
- "one": 1,
- },
- "id": "component-one--a",
- "initialArgs": Object {
- "foo": "edited",
- "one": 1,
- },
- "parameters": Object {
- "__isArgsStory": false,
- "docs": Any<Object>,
- "fileName": "./src/ComponentOne.stories.js",
- },
+ "newPhase": "loading",
+ "storyId": "component-one--a",
},
]
4th bound emit call:
Array [
- "storyPrepared",
+ "storyRenderPhaseChanged",
Object {
- "argTypes": Object {
- "foo": Object {
- "name": "foo",
- "type": Object {
- "name": "string",
- },
- },
- "one": Object {
- "mapping": Object {
- "1": "mapped-1",
- },
- "name": "one",
- "type": Object {
- "name": "string",
- },
- },
- },
- "args": Object {
- "foo": "edited",
- "one": 1,
- },
- "id": "component-one--a",
- "initialArgs": Object {
- "foo": "edited",
- "one": 1,
- },
- "parameters": Object {
- "__isArgsStory": false,
- "docs": Any<Object>,
- "fileName": "./src/ComponentOne.stories.js",
- },
+ "newPhase": "rendering",
+ "storyId": "component-one--a",
},
]
5th bound emit call:
Array [
- "storyPrepared",
+ "storyRenderPhaseChanged",
Object {
- "argTypes": Object {
- "foo": Object {
- "name": "foo",
- "type": Object {
- "name": "string",
- },
- },
- "one": Object {
- "mapping": Object {
- "1": "mapped-1",
-
|
src/preview-api/modules/preview-web/PreviewWeb.test.ts > PreviewWeb > onStoriesChanged > when the current story changes > applies loaders with story context:
code/core/src/preview-api/modules/preview-web/PreviewWeb.test.ts#L2855
AssertionError: expected "spy" to be called with arguments: [ ObjectContaining{…} ]
Received:
1st spy call:
Array [
- ObjectContaining {
+ Object {
+ "abortSignal": AbortSignal {
+ "aborted": false,
+ "onabort": null,
+ "reason": null,
+ Symbol(listeners): Object {},
+ Symbol(listenerOptions): Object {},
+ },
+ "allArgs": undefined,
+ "applyBeforeEach": [Function applyBeforeEach],
+ "applyLoaders": [Function applyLoaders],
"argTypes": Object {
"foo": Object {
"name": "foo",
"type": Object {
"name": "string",
},
},
"one": Object {
"mapping": Object {
"1": "mapped-1",
},
"name": "one",
"type": Object {
"name": "string",
},
},
},
"args": Object {
- "foo": "edited",
+ "foo": "a",
"one": "mapped-1",
},
+ "argsByTarget": undefined,
+ "canvas": Object {},
+ "canvasElement": "story-element",
+ "component": undefined,
+ "componentId": "component-one",
+ "context": [Circular],
+ "globals": Object {
+ "a": "b",
+ },
+ "hooks": HooksContext {
+ "currentContext": null,
+ "currentDecoratorName": null,
+ "currentEffects": Array [],
+ "currentHooks": Array [],
+ "currentPhase": "NONE",
+ "hasUpdates": false,
+ "hookListsMap": WeakMap {},
+ "mountedDecorators": Set {},
+ "nextHookIndex": 0,
+ "prevEffects": Array [],
+ "prevMountedDecorators": Set {},
+ "renderListener": [Function anonymous],
+ },
"id": "component-one--a",
"initialArgs": Object {
- "foo": "edited",
+ "foo": "a",
+ "one": 1,
+ },
+ "kind": "Component One",
+ "loaded": Object {
+ "l": 7,
+ },
+ "moduleExport": Object {
+ "args": Object {
+ "foo": "a",
"one": 1,
},
+ "play": [Function spy],
+ },
+ "mount": [Function anonymous],
+ "name": "A",
+ "originalStoryFn": [Function spy],
"parameters": Object {
"__isArgsStory": false,
- "docs": Any<Object>,
+ "docs": Object {
+ "container": [Function spy],
+ "page": [Function spy],
+ "renderer": [Function renderer],
+ },
"fileName": "./src/ComponentOne.stories.js",
},
+ "playFunction": [Function spy],
+ "renderToCanvas": [Function renderToCanvas],
+ "runStep": [Function anonymous],
+ "step": [Function step],
+ "story": "A",
+ "subcomponents": undefined,
+ "tags": Array [
+ "dev",
+ "test",
+ ],
+ "testingLibraryRender": undefined,
+ "title": "Component One",
+ "unboundStoryFn": [Function unboundStoryFn],
+ "undecoratedStoryFn": [Function undecoratedStoryFn],
+ "unmappedArgs": Object {
+ "foo": "a",
+ "one": 1,
+ },
+ "usesMount": false,
+ "viewMode": "story",
},
]
Number of calls: 1
❯ src/preview-api/modules/preview-web/PreviewWeb.test.ts:2855:56
|
src/preview-api/modules/preview-web/PreviewWeb.test.ts > PreviewWeb > onStoriesChanged > when the current story changes > passes loaded context to renderToCanvas:
code/core/src/preview-api/modules/preview-web/PreviewWeb.test.ts#L2882
AssertionError: expected "spy" to be called with arguments: [ Array(2) ]
Received:
1st spy call:
Array [
- ObjectContaining {
+ Object {
+ "componentId": "component-one",
"forceRemount": true,
- "storyContext": ObjectContaining {
+ "id": "component-one--a",
+ "kind": "Component One",
+ "name": "A",
+ "showError": [Function showError],
+ "showException": [Function showException],
+ "showMain": [Function showMain],
+ "showStoryDuringRender": [Function showStoryDuringRender],
+ "story": "A",
+ "storyContext": Object {
+ "abortSignal": AbortSignal {
+ "aborted": false,
+ "onabort": null,
+ "reason": null,
+ Symbol(listeners): Object {},
+ Symbol(listenerOptions): Object {},
+ },
+ "allArgs": undefined,
+ "applyBeforeEach": [Function applyBeforeEach],
+ "applyLoaders": [Function applyLoaders],
"argTypes": Object {
"foo": Object {
"name": "foo",
"type": Object {
"name": "string",
},
},
"one": Object {
"mapping": Object {
"1": "mapped-1",
},
"name": "one",
"type": Object {
"name": "string",
},
},
},
"args": Object {
- "foo": "edited",
+ "foo": "a",
"one": "mapped-1",
},
+ "argsByTarget": undefined,
+ "canvas": Object {},
+ "canvasElement": "story-element",
+ "component": undefined,
+ "componentId": "component-one",
+ "context": [Circular],
"globals": Object {
"a": "b",
+ },
+ "hooks": HooksContext {
+ "currentContext": null,
+ "currentDecoratorName": null,
+ "currentEffects": Array [],
+ "currentHooks": Array [],
+ "currentPhase": "NONE",
+ "hasUpdates": false,
+ "hookListsMap": WeakMap {},
+ "mountedDecorators": Set {},
+ "nextHookIndex": 0,
+ "prevEffects": Array [],
+ "prevMountedDecorators": Set {},
+ "renderListener": [Function anonymous],
},
"id": "component-one--a",
"initialArgs": Object {
- "foo": "edited",
+ "foo": "a",
"one": 1,
},
+ "kind": "Component One",
"loaded": Object {
"l": 7,
},
+ "moduleExport": Object {
+ "args": Object {
+ "foo": "a",
+ "one": 1,
+ },
+ "play": [Function spy],
+ },
+ "mount": [Function anonymous],
+ "name": "A",
+ "originalStoryFn": [Function spy],
"parameters": Object {
"__isArgsStory": false,
- "docs": Any<Object>,
+ "docs": Object {
+ "container": [Function spy],
+ "page": [Function spy],
+ "renderer": [Function renderer],
+ },
"fileName": "./src/ComponentOne.stories.js",
},
+ "playFunction": [Function spy],
+ "renderToCanvas": [Function renderToCanvas],
+ "runStep": [Function anonymous],
+ "step": [Function step],
+ "story": "A",
+ "subcomponents": undefined,
+ "tags": Array [
+ "dev",
+ "test",
+ ],
+ "testingLibraryRender": undefined,
+ "title": "Component One",
+ "unboundStoryFn": [Function unboundStoryFn],
+ "undecoratedStoryFn": [Function undecoratedStoryFn],
+ "unmappedArgs": Object {
+ "foo": "a",
+ "one": 1,
},
+ "usesMount": false,
+ "viewMode": "story",
+ },
+ "storyFn": [Function storyFn],
+ "tags": Array [
+ "dev",
+ "test",
+ ],
+ "title": "Component One",
+ "unboundStoryFn": [Function unboundStoryFn],
},
"story-element",
]
Number of calls: 1
❯ src/preview-api/modules/preview-web/PreviewWeb.test.ts:2882:51
|
Core Unit Tests, windows-latest
Process completed with exit code 1.
|