@sprucelabs/spruce-location-utils 9.4.2 → 9.4.3

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.
@@ -10,9 +10,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  import { eventFaker } from '@sprucelabs/spruce-test-fixtures';
11
11
  import { assert } from '@sprucelabs/test-utils';
12
12
  import LocationListCardViewController from '../viewControllers/LocationListCard.vc.js';
13
+ let wasBeforeEachCalled = false;
13
14
  const locationListCardAssert = {
14
15
  beforeEach(views) {
15
16
  views.setController('locations.list-card', SpyLocationListCard);
17
+ wasBeforeEachCalled = true;
16
18
  },
17
19
  loadsWithTargetAndPayload(options) {
18
20
  return __awaiter(this, void 0, void 0, function* () {
@@ -36,6 +38,8 @@ const locationListCardAssert = {
36
38
  });
37
39
  },
38
40
  configurationEquals(vc, options) {
41
+ assert.isTrue(wasBeforeEachCalled, "You have to call locationListCardAssert.beforeEach() in your beforeEach(). Also, make sure you are not overridding the view controller for 'locations.list-card' by checking viewFactory.hasController() before setting it!");
42
+ assert.isTrue(vc instanceof SpyLocationListCard, "You have overridden the vc at 'locations.list-card'! Make sure you are checking viewFactory.hasController() before setting it!");
39
43
  const spyVc = vc;
40
44
  const keys = Object.keys(options);
41
45
  for (const key of keys) {
@@ -7,9 +7,11 @@ exports.SpyLocationListCard = void 0;
7
7
  const spruce_test_fixtures_1 = require("@sprucelabs/spruce-test-fixtures");
8
8
  const test_utils_1 = require("@sprucelabs/test-utils");
9
9
  const LocationListCard_vc_1 = __importDefault(require("../viewControllers/LocationListCard.vc"));
10
+ let wasBeforeEachCalled = false;
10
11
  const locationListCardAssert = {
11
12
  beforeEach(views) {
12
13
  views.setController('locations.list-card', SpyLocationListCard);
14
+ wasBeforeEachCalled = true;
13
15
  },
14
16
  async loadsWithTargetAndPayload(options) {
15
17
  const { action, target, payload } = options;
@@ -31,6 +33,8 @@ const locationListCardAssert = {
31
33
  }
32
34
  },
33
35
  configurationEquals(vc, options) {
36
+ test_utils_1.assert.isTrue(wasBeforeEachCalled, "You have to call locationListCardAssert.beforeEach() in your beforeEach(). Also, make sure you are not overridding the view controller for 'locations.list-card' by checking viewFactory.hasController() before setting it!");
37
+ test_utils_1.assert.isTrue(vc instanceof SpyLocationListCard, "You have overridden the vc at 'locations.list-card'! Make sure you are checking viewFactory.hasController() before setting it!");
34
38
  const spyVc = vc;
35
39
  const keys = Object.keys(options);
36
40
  for (const key of keys) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sprucelabs/spruce-location-utils",
3
3
  "description": "Location Utilities",
4
- "version": "9.4.2",
4
+ "version": "9.4.3",
5
5
  "skill": {
6
6
  "namespace": "locations"
7
7
  },