@sprucelabs/spruce-test-fixtures 59.2.0 → 60.0.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.
Files changed (31) hide show
  1. package/build/__tests__/behavioral/LocationFixture.test.d.ts +1 -1
  2. package/build/__tests__/behavioral/faking/UsingFakeDecorators.test.d.ts +1 -1
  3. package/build/__tests__/behavioral/views/TestingScope.test.d.ts +6 -0
  4. package/build/__tests__/behavioral/views/TestingScope.test.js +42 -9
  5. package/build/__tests__/support/AbstractFakeDecoratorTest.d.ts +1 -1
  6. package/build/errors/SpruceError.js +1 -1
  7. package/build/esm/__tests__/behavioral/LocationFixture.test.d.ts +1 -1
  8. package/build/esm/__tests__/behavioral/faking/UsingFakeDecorators.test.d.ts +1 -1
  9. package/build/esm/__tests__/behavioral/views/TestingScope.test.d.ts +6 -0
  10. package/build/esm/__tests__/behavioral/views/TestingScope.test.js +52 -9
  11. package/build/esm/__tests__/support/AbstractFakeDecoratorTest.d.ts +1 -1
  12. package/build/esm/errors/SpruceError.js +1 -1
  13. package/build/esm/tests/eventFaker.d.ts +1 -1
  14. package/build/esm/tests/eventMocker.d.ts +4840 -4
  15. package/build/esm/tests/fixtures/LocationFixture.d.ts +4 -4
  16. package/build/esm/tests/fixtures/OrganizationFixture.d.ts +4 -4
  17. package/build/esm/tests/fixtures/PersonFixture.d.ts +3 -3
  18. package/build/esm/tests/fixtures/RoleFixture.d.ts +3 -3
  19. package/build/esm/tests/fixtures/SeedFixture.d.ts +1 -1
  20. package/build/esm/tests/fixtures/SpyScope.d.ts +7 -2
  21. package/build/esm/tests/fixtures/SpyScope.js +32 -16
  22. package/build/tests/eventFaker.d.ts +1 -1
  23. package/build/tests/eventMocker.d.ts +4840 -4
  24. package/build/tests/fixtures/LocationFixture.d.ts +4 -4
  25. package/build/tests/fixtures/OrganizationFixture.d.ts +4 -4
  26. package/build/tests/fixtures/PersonFixture.d.ts +3 -3
  27. package/build/tests/fixtures/RoleFixture.d.ts +3 -3
  28. package/build/tests/fixtures/SeedFixture.d.ts +1 -1
  29. package/build/tests/fixtures/SpyScope.d.ts +7 -2
  30. package/build/tests/fixtures/SpyScope.js +32 -16
  31. package/package.json +26 -26
@@ -11,7 +11,7 @@ export default class LocationFixtureTest extends AbstractSpruceFixtureTest {
11
11
  protected static canRemoveRole(): Promise<void>;
12
12
  private static isPersonPartOfLocation;
13
13
  protected static seedLocationAndAddPerson(): Promise<{
14
- location: NonNullable<import("@sprucelabs/schema").SchemaStaticValues<import("@sprucelabs/mercury-types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<import("@sprucelabs/mercury-types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<import("@sprucelabs/mercury-types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false>>>;
14
+ location: Pick<import("@sprucelabs/schema").SchemaStaticValues<import("@sprucelabs/mercury-types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<import("@sprucelabs/mercury-types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<import("@sprucelabs/mercury-types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false>>, "id" | "address" | "phone" | "name" | "organizationId" | "timezone" | "dateCreated" | "dateDeleted" | "isPublic" | "slug" | "num">;
15
15
  person: import("@sprucelabs/mercury-types").SpruceSchemas.Spruce.v2020_07_22.Person;
16
16
  }>;
17
17
  }
@@ -27,7 +27,7 @@ export default class UsingFakeDecoratorsTest extends AbstractSpruceFixtureTest {
27
27
  protected static listingPeopleThrowsWhenDoingSomethingNotSupported(payload: any): Promise<void>;
28
28
  protected static throwingInRequestPinDoesNotCrashNextTest(): Promise<void>;
29
29
  protected static thisTestShouldNotCrashBecauseTestBeforeIt(): Promise<void>;
30
- protected static emitGetLocationEvent(locationId: string): Promise<NonNullable<import("@sprucelabs/schema").SchemaStaticValues<import("@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schemas.types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<import("@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schemas.types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<import("@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schemas.types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false>>>>;
30
+ protected static emitGetLocationEvent(locationId: string): Promise<Pick<import("@sprucelabs/schema").SchemaStaticValues<import("@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schemas.types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<import("@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schemas.types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<import("@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schemas.types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false>>, "id" | "address" | "phone" | "name" | "organizationId" | "timezone" | "dateCreated" | "dateDeleted" | "isPublic" | "slug" | "num">>;
31
31
  protected static shouldBeAbleToOffListenersAndNotBreakEverything(): Promise<void>;
32
32
  protected static thisWhoAmIShouldStillWork(): Promise<void>;
33
33
  private static emitWhoAmI;
@@ -14,5 +14,11 @@ export default class TestingScopeTest extends AbstractSpruceFixtureTest {
14
14
  protected static canGetCurrentLocationWhenScopedToLocation(flags: ScopeFlag[]): Promise<void>;
15
15
  protected static canGetCurrentOrganizationWhenScopedToOrg(flags: ScopeFlag[]): Promise<void>;
16
16
  protected static loadingAVcSetsFlags(flags: ScopeFlag[]): Promise<void>;
17
+ protected static canDisableThrowOnInvalidScopeRequest(): Promise<void>;
18
+ protected static canEnableThrowsOnInvalidScopeRequest(): Promise<void>;
19
+ private static disableThrowOnRequestOutOfScope;
20
+ private static asserthInvalidScopeOnGetOrganization;
21
+ private static assertCurrentOrgEqualsLatest;
22
+ private static assertCurrentLocationEqualsLatest;
17
23
  private static setFlags;
18
24
  }
@@ -68,21 +68,15 @@ let TestingScopeTest = class TestingScopeTest extends AbstractSpruceFixtureTest_
68
68
  }
69
69
  static async getCurrentOrgThrowsWhenScopedToNone() {
70
70
  this.setFlags(['none']);
71
- const err = await test_utils_1.assert.doesThrowAsync(() => this.scope.getCurrentOrganization());
72
- test_utils_1.errorAssert.assertError(err, 'INVALID_SCOPE_REQUEST', {
73
- flags: ['none'],
74
- attemptedToGet: 'organization',
75
- });
71
+ await this.asserthInvalidScopeOnGetOrganization();
76
72
  }
77
73
  static async canGetCurrentLocationWhenScopedToLocation(flags) {
78
74
  this.setFlags(flags);
79
- const location = await this.scope.getCurrentLocation();
80
- test_utils_1.assert.isTruthy(location);
75
+ await this.assertCurrentLocationEqualsLatest();
81
76
  }
82
77
  static async canGetCurrentOrganizationWhenScopedToOrg(flags) {
83
78
  this.setFlags(flags);
84
- const org = await this.scope.getCurrentOrganization();
85
- test_utils_1.assert.isTruthy(org);
79
+ await this.assertCurrentOrgEqualsLatest();
86
80
  }
87
81
  static async loadingAVcSetsFlags(flags) {
88
82
  ScopedSkillViewController.scopeFlags = flags;
@@ -90,6 +84,37 @@ let TestingScopeTest = class TestingScopeTest extends AbstractSpruceFixtureTest_
90
84
  await this.views.load(vc);
91
85
  test_utils_1.assert.isEqualDeep(this.scope.getFlags(), ScopedSkillViewController.scopeFlags);
92
86
  }
87
+ static async canDisableThrowOnInvalidScopeRequest() {
88
+ this.disableThrowOnRequestOutOfScope();
89
+ this.setFlags(['organization']);
90
+ await this.assertCurrentLocationEqualsLatest();
91
+ this.setFlags(['none']);
92
+ await this.assertCurrentOrgEqualsLatest();
93
+ }
94
+ static async canEnableThrowsOnInvalidScopeRequest() {
95
+ this.disableThrowOnRequestOutOfScope();
96
+ this.scope.enableThrowOnRequestOutOfScope();
97
+ this.setFlags(['none']);
98
+ await this.asserthInvalidScopeOnGetOrganization();
99
+ }
100
+ static disableThrowOnRequestOutOfScope() {
101
+ this.scope.disableThrowOnRequestOutOfScope();
102
+ }
103
+ static async asserthInvalidScopeOnGetOrganization() {
104
+ const err = await test_utils_1.assert.doesThrowAsync(() => this.scope.getCurrentOrganization());
105
+ test_utils_1.errorAssert.assertError(err, 'INVALID_SCOPE_REQUEST', {
106
+ flags: ['none'],
107
+ attemptedToGet: 'organization',
108
+ });
109
+ }
110
+ static async assertCurrentOrgEqualsLatest() {
111
+ const org = await this.scope.getCurrentOrganization();
112
+ test_utils_1.assert.isEqualDeep(org, this.fakedOrganizations[0]);
113
+ }
114
+ static async assertCurrentLocationEqualsLatest() {
115
+ const location = await this.scope.getCurrentLocation();
116
+ test_utils_1.assert.isEqualDeep(location, this.fakedLocations[0]);
117
+ }
93
118
  static setFlags(flags) {
94
119
  this.scope.setFlags(flags);
95
120
  }
@@ -147,6 +172,14 @@ __decorate([
147
172
  (0, test_utils_1.test)('loading svc sets flags 2', ['organization']),
148
173
  (0, seed_1.default)('locations', 1)
149
174
  ], TestingScopeTest, "loadingAVcSetsFlags", null);
175
+ __decorate([
176
+ (0, test_utils_1.test)(),
177
+ (0, seed_1.default)('locations', 1)
178
+ ], TestingScopeTest, "canDisableThrowOnInvalidScopeRequest", null);
179
+ __decorate([
180
+ (0, test_utils_1.test)(),
181
+ (0, seed_1.default)('locations', 1)
182
+ ], TestingScopeTest, "canEnableThrowsOnInvalidScopeRequest", null);
150
183
  TestingScopeTest = __decorate([
151
184
  fake_1.default.login(constants_1.DEMO_NUMBER_SCOPE)
152
185
  ], TestingScopeTest);
@@ -1,5 +1,5 @@
1
1
  import AbstractSpruceFixtureTest from '../../tests/AbstractSpruceFixtureTest';
2
2
  export default class AbstractFakeDecoratorTest extends AbstractSpruceFixtureTest {
3
- protected static fakeLoginAndGetAuth(phone?: string): Promise<NonNullable<import("@sprucelabs/schema").SchemaStaticValues<import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.AuthSchemaSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.AuthSchemaSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.AuthSchemaSchema, false>>>>;
3
+ protected static fakeLoginAndGetAuth(phone?: string): Promise<Pick<import("@sprucelabs/schema").SchemaStaticValues<import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.AuthSchemaSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.AuthSchemaSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.AuthSchemaSchema, false>>, "person" | "skill">>;
4
4
  protected static fakeLogin(number?: string): Promise<void>;
5
5
  }
@@ -35,7 +35,7 @@ class SpruceError extends error_1.default {
35
35
  message = `Scope requirements not met! Make sure you are seeding what you expect (location or org)!`;
36
36
  break;
37
37
  case 'INVALID_SCOPE_REQUEST':
38
- message = `You just tried to get the current ${options.attemptedToGet} but are currently scoped to ${options.flags.join(', ')}! Check your skill view's getScope() implementation.`;
38
+ message = `You just tried to get the current ${options.attemptedToGet} but are currently scoped to ${options.flags.join(', ')}! Check your skill view's getScope() implementation. If your are building a component that will be used in when scope is unknown, try this.views.getScope().disableThrowOnRequestOutOfScope()`;
39
39
  break;
40
40
  default:
41
41
  message = super.friendlyMessage();
@@ -11,7 +11,7 @@ export default class LocationFixtureTest extends AbstractSpruceFixtureTest {
11
11
  protected static canRemoveRole(): Promise<void>;
12
12
  private static isPersonPartOfLocation;
13
13
  protected static seedLocationAndAddPerson(): Promise<{
14
- location: NonNullable<import("@sprucelabs/schema").SchemaStaticValues<import("@sprucelabs/mercury-types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<import("@sprucelabs/mercury-types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<import("@sprucelabs/mercury-types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false>>>;
14
+ location: Pick<import("@sprucelabs/schema").SchemaStaticValues<import("@sprucelabs/mercury-types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<import("@sprucelabs/mercury-types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<import("@sprucelabs/mercury-types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false>>, "id" | "address" | "phone" | "name" | "organizationId" | "timezone" | "dateCreated" | "dateDeleted" | "isPublic" | "slug" | "num">;
15
15
  person: import("@sprucelabs/mercury-types").SpruceSchemas.Spruce.v2020_07_22.Person;
16
16
  }>;
17
17
  }
@@ -27,7 +27,7 @@ export default class UsingFakeDecoratorsTest extends AbstractSpruceFixtureTest {
27
27
  protected static listingPeopleThrowsWhenDoingSomethingNotSupported(payload: any): Promise<void>;
28
28
  protected static throwingInRequestPinDoesNotCrashNextTest(): Promise<void>;
29
29
  protected static thisTestShouldNotCrashBecauseTestBeforeIt(): Promise<void>;
30
- protected static emitGetLocationEvent(locationId: string): Promise<NonNullable<import("@sprucelabs/schema").SchemaStaticValues<import("@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schemas.types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<import("@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schemas.types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<import("@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schemas.types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false>>>>;
30
+ protected static emitGetLocationEvent(locationId: string): Promise<Pick<import("@sprucelabs/schema").SchemaStaticValues<import("@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schemas.types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<import("@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schemas.types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<import("@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schemas.types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false>>, "id" | "address" | "phone" | "name" | "organizationId" | "timezone" | "dateCreated" | "dateDeleted" | "isPublic" | "slug" | "num">>;
31
31
  protected static shouldBeAbleToOffListenersAndNotBreakEverything(): Promise<void>;
32
32
  protected static thisWhoAmIShouldStillWork(): Promise<void>;
33
33
  private static emitWhoAmI;
@@ -14,5 +14,11 @@ export default class TestingScopeTest extends AbstractSpruceFixtureTest {
14
14
  protected static canGetCurrentLocationWhenScopedToLocation(flags: ScopeFlag[]): Promise<void>;
15
15
  protected static canGetCurrentOrganizationWhenScopedToOrg(flags: ScopeFlag[]): Promise<void>;
16
16
  protected static loadingAVcSetsFlags(flags: ScopeFlag[]): Promise<void>;
17
+ protected static canDisableThrowOnInvalidScopeRequest(): Promise<void>;
18
+ protected static canEnableThrowsOnInvalidScopeRequest(): Promise<void>;
19
+ private static disableThrowOnRequestOutOfScope;
20
+ private static asserthInvalidScopeOnGetOrganization;
21
+ private static assertCurrentOrgEqualsLatest;
22
+ private static assertCurrentLocationEqualsLatest;
17
23
  private static setFlags;
18
24
  }
@@ -92,25 +92,19 @@ let TestingScopeTest = class TestingScopeTest extends AbstractSpruceFixtureTest
92
92
  static getCurrentOrgThrowsWhenScopedToNone() {
93
93
  return __awaiter(this, void 0, void 0, function* () {
94
94
  this.setFlags(['none']);
95
- const err = yield assert.doesThrowAsync(() => this.scope.getCurrentOrganization());
96
- errorAssert.assertError(err, 'INVALID_SCOPE_REQUEST', {
97
- flags: ['none'],
98
- attemptedToGet: 'organization',
99
- });
95
+ yield this.asserthInvalidScopeOnGetOrganization();
100
96
  });
101
97
  }
102
98
  static canGetCurrentLocationWhenScopedToLocation(flags) {
103
99
  return __awaiter(this, void 0, void 0, function* () {
104
100
  this.setFlags(flags);
105
- const location = yield this.scope.getCurrentLocation();
106
- assert.isTruthy(location);
101
+ yield this.assertCurrentLocationEqualsLatest();
107
102
  });
108
103
  }
109
104
  static canGetCurrentOrganizationWhenScopedToOrg(flags) {
110
105
  return __awaiter(this, void 0, void 0, function* () {
111
106
  this.setFlags(flags);
112
- const org = yield this.scope.getCurrentOrganization();
113
- assert.isTruthy(org);
107
+ yield this.assertCurrentOrgEqualsLatest();
114
108
  });
115
109
  }
116
110
  static loadingAVcSetsFlags(flags) {
@@ -121,6 +115,47 @@ let TestingScopeTest = class TestingScopeTest extends AbstractSpruceFixtureTest
121
115
  assert.isEqualDeep(this.scope.getFlags(), ScopedSkillViewController.scopeFlags);
122
116
  });
123
117
  }
118
+ static canDisableThrowOnInvalidScopeRequest() {
119
+ return __awaiter(this, void 0, void 0, function* () {
120
+ this.disableThrowOnRequestOutOfScope();
121
+ this.setFlags(['organization']);
122
+ yield this.assertCurrentLocationEqualsLatest();
123
+ this.setFlags(['none']);
124
+ yield this.assertCurrentOrgEqualsLatest();
125
+ });
126
+ }
127
+ static canEnableThrowsOnInvalidScopeRequest() {
128
+ return __awaiter(this, void 0, void 0, function* () {
129
+ this.disableThrowOnRequestOutOfScope();
130
+ this.scope.enableThrowOnRequestOutOfScope();
131
+ this.setFlags(['none']);
132
+ yield this.asserthInvalidScopeOnGetOrganization();
133
+ });
134
+ }
135
+ static disableThrowOnRequestOutOfScope() {
136
+ this.scope.disableThrowOnRequestOutOfScope();
137
+ }
138
+ static asserthInvalidScopeOnGetOrganization() {
139
+ return __awaiter(this, void 0, void 0, function* () {
140
+ const err = yield assert.doesThrowAsync(() => this.scope.getCurrentOrganization());
141
+ errorAssert.assertError(err, 'INVALID_SCOPE_REQUEST', {
142
+ flags: ['none'],
143
+ attemptedToGet: 'organization',
144
+ });
145
+ });
146
+ }
147
+ static assertCurrentOrgEqualsLatest() {
148
+ return __awaiter(this, void 0, void 0, function* () {
149
+ const org = yield this.scope.getCurrentOrganization();
150
+ assert.isEqualDeep(org, this.fakedOrganizations[0]);
151
+ });
152
+ }
153
+ static assertCurrentLocationEqualsLatest() {
154
+ return __awaiter(this, void 0, void 0, function* () {
155
+ const location = yield this.scope.getCurrentLocation();
156
+ assert.isEqualDeep(location, this.fakedLocations[0]);
157
+ });
158
+ }
124
159
  static setFlags(flags) {
125
160
  this.scope.setFlags(flags);
126
161
  }
@@ -178,6 +213,14 @@ __decorate([
178
213
  test('loading svc sets flags 2', ['organization']),
179
214
  seed('locations', 1)
180
215
  ], TestingScopeTest, "loadingAVcSetsFlags", null);
216
+ __decorate([
217
+ test(),
218
+ seed('locations', 1)
219
+ ], TestingScopeTest, "canDisableThrowOnInvalidScopeRequest", null);
220
+ __decorate([
221
+ test(),
222
+ seed('locations', 1)
223
+ ], TestingScopeTest, "canEnableThrowsOnInvalidScopeRequest", null);
181
224
  TestingScopeTest = __decorate([
182
225
  fake.login(DEMO_NUMBER_SCOPE)
183
226
  ], TestingScopeTest);
@@ -1,5 +1,5 @@
1
1
  import AbstractSpruceFixtureTest from '../../tests/AbstractSpruceFixtureTest';
2
2
  export default class AbstractFakeDecoratorTest extends AbstractSpruceFixtureTest {
3
- protected static fakeLoginAndGetAuth(phone?: string): Promise<NonNullable<import("@sprucelabs/schema").SchemaStaticValues<import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.AuthSchemaSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.AuthSchemaSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.AuthSchemaSchema, false>>>>;
3
+ protected static fakeLoginAndGetAuth(phone?: string): Promise<Pick<import("@sprucelabs/schema").SchemaStaticValues<import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.AuthSchemaSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.AuthSchemaSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.AuthSchemaSchema, false>>, "person" | "skill">>;
4
4
  protected static fakeLogin(number?: string): Promise<void>;
5
5
  }
@@ -30,7 +30,7 @@ export default class SpruceError extends BaseSpruceError {
30
30
  message = `Scope requirements not met! Make sure you are seeding what you expect (location or org)!`;
31
31
  break;
32
32
  case 'INVALID_SCOPE_REQUEST':
33
- message = `You just tried to get the current ${options.attemptedToGet} but are currently scoped to ${options.flags.join(', ')}! Check your skill view's getScope() implementation.`;
33
+ message = `You just tried to get the current ${options.attemptedToGet} but are currently scoped to ${options.flags.join(', ')}! Check your skill view's getScope() implementation. If your are building a component that will be used in when scope is unknown, try this.views.getScope().disableThrowOnRequestOutOfScope()`;
34
34
  break;
35
35
  default:
36
36
  message = super.friendlyMessage();
@@ -8,6 +8,6 @@ type Response<E extends Fqen> = ResponsePayloadSchema<E> extends Schema ? Schema
8
8
  declare const eventFaker: {
9
9
  makeEventThrow(fqen: Fqen, error?: any): Promise<void>;
10
10
  handleReactiveEvent(fqen: Fqen): Promise<void>;
11
- on<E extends Fqen>(fqen: E, cb: (targetAndPayload: SchemaValues<EmitPayloadSchema<E> extends Schema ? EmitPayloadSchema<E> : never, false>) => Response<E> | Promise<Response<E>>): Promise<void>;
11
+ on<E extends Fqen>(fqen: E, cb: (targetAndPayload: SchemaValues<EmitPayloadSchema<E> extends Schema ? EmitPayloadSchema<E> : never, false, true, false, Extract<keyof (EmitPayloadSchema<E> extends Schema ? EmitPayloadSchema<E> : never)["fields"], string>, import("@sprucelabs/schema").SchemaPublicFieldNames<EmitPayloadSchema<E> extends Schema ? EmitPayloadSchema<E> : never>>) => Response<E> | Promise<Response<E>>): Promise<void>;
12
12
  };
13
13
  export default eventFaker;