@quintype/framework 7.10.0 → 7.10.1-custom-infinite-scroll.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quintype/framework",
3
- "version": "7.10.0",
3
+ "version": "7.10.1-custom-infinite-scroll.0",
4
4
  "description": "Libraries to help build Quintype Node.js apps",
5
5
  "main": "index.js",
6
6
  "engines": {
@@ -81,7 +81,7 @@ class InfiniteScrollAmp {
81
81
  return JSON.stringify(formattedData);
82
82
  }
83
83
 
84
- async getInitialInlineConfig(storyId) {
84
+ async getInitialInlineConfig({ storyId }) {
85
85
  if (!storyId) return new Error("Required params for getInitialInlineConfig missing");
86
86
  const filteredItems =
87
87
  await this.getInfiniteScrollList({ storyId, type: "inlineConfig", offset: 0, limit: 5 });
@@ -136,7 +136,7 @@ describe("getInitialInlineConfig method of InfiniteScrollAmp helper function", f
136
136
  client: getClientStub(),
137
137
  publisherConfig: dummyPublisherConfig,
138
138
  });
139
- const inlineConfig = await infiniteScrollAmp.getInitialInlineConfig();
139
+ const inlineConfig = await infiniteScrollAmp.getInitialInlineConfig({ storyId: "" });
140
140
  assert.strictEqual(inlineConfig instanceof Error, true);
141
141
  assert.throws(() => {
142
142
  throw new Error("Required params for getInitialInlineConfig missing");