@@ -53,13 +53,15 @@ describe(`Node Manifest API in "gatsby ${gatsbyCommandName}"`, () => {
53
53
54
54
expect ( manifestFileContents . node . id ) . toBe ( `1` )
55
55
expect ( manifestFileContents . page . path ) . toBe ( `/one` )
56
+ expect ( manifestFileContents . foundPageBy ) . toBe ( `ownerNodeId` )
56
57
} )
57
58
58
59
it ( `Creates an accurate node manifest when ownerNodeId isn't present but there's a matching "id" in pageContext` , async ( ) => {
59
60
const manifestFileContents = await getManifestContents ( 2 )
60
61
61
62
expect ( manifestFileContents . node . id ) . toBe ( `2` )
62
63
expect ( manifestFileContents . page . path ) . toBe ( `/two` )
64
+ expect ( manifestFileContents . foundPageBy ) . toBe ( `context.id` )
63
65
} )
64
66
65
67
if ( gatsbyCommandName === `build` ) {
@@ -74,6 +76,7 @@ describe(`Node Manifest API in "gatsby ${gatsbyCommandName}"`, () => {
74
76
manifestFileContents . page . path
75
77
)
76
78
) . toBe ( true )
79
+ expect ( manifestFileContents . foundPageBy ) . toBe ( `queryTracking` )
77
80
} )
78
81
79
82
// this doesn't work in gatsby develop since page-data.json files aren't written out
@@ -93,12 +96,14 @@ describe(`Node Manifest API in "gatsby ${gatsbyCommandName}"`, () => {
93
96
94
97
expect ( manifestFileContents . node . id ) . toBe ( `4` )
95
98
expect ( manifestFileContents . page . path ) . toBe ( null )
99
+ expect ( manifestFileContents . foundPageBy ) . toBe ( `none` )
96
100
} )
97
101
98
102
it ( `Creates a Node manifest for filesystem routes` , async ( ) => {
99
103
const manifestFileContents = await getManifestContents ( `filesystem-1` )
100
104
101
105
expect ( manifestFileContents . node . id ) . toBe ( `filesystem-1` )
102
106
expect ( manifestFileContents . page . path ) . toBe ( `/filesystem-1/` )
107
+ expect ( manifestFileContents . foundPageBy ) . toBe ( `filesystem-route-api` )
103
108
} )
104
109
} )
0 commit comments