@sprucelabs/data-stores 11.2.1 → 11.2.2

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.
@@ -7,7 +7,11 @@ const CursorPager_1 = __importDefault(require("./CursorPager"));
7
7
  class CursorPagerFaker {
8
8
  static setResponse(response) {
9
9
  //@ts-ignore
10
- CursorPager_1.default.find = response;
10
+ CursorPager_1.default.find = async (...args) => {
11
+ //@ts-ignore
12
+ const results = await response(...args);
13
+ return Object.assign({ next: null, previous: null, records: [] }, results);
14
+ };
11
15
  }
12
16
  static async beforeEach() {
13
17
  if (!this.originalFind) {
@@ -11,7 +11,11 @@ import CursorPager from './CursorPager.js';
11
11
  export default class CursorPagerFaker {
12
12
  static setResponse(response) {
13
13
  //@ts-ignore
14
- CursorPager.find = response;
14
+ CursorPager.find = (...args) => __awaiter(this, void 0, void 0, function* () {
15
+ //@ts-ignore
16
+ const results = yield response(...args);
17
+ return Object.assign({ next: null, previous: null, records: [] }, results);
18
+ });
15
19
  }
16
20
  static beforeEach() {
17
21
  return __awaiter(this, void 0, void 0, function* () {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "11.2.1",
6
+ "version": "11.2.2",
7
7
  "files": [
8
8
  "build/**/*",
9
9
  "!build/__tests__",