@sprucelabs/spruce-test-fixtures 49.0.39 → 49.0.42

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 (135) hide show
  1. package/build/__tests__/behavioral/CanUseStoresSetupInBeforeEach.test.js +5 -5
  2. package/build/__tests__/behavioral/DatabaseFixture.test.d.ts +1 -1
  3. package/build/__tests__/behavioral/DatabaseFixture.test.js +7 -7
  4. package/build/__tests__/behavioral/DbResetsAsExpected.test.js +4 -4
  5. package/build/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.js +18 -18
  6. package/build/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.js +3 -3
  7. package/build/__tests__/behavioral/DisablingSchemaValidationOnTest.test.js +5 -5
  8. package/build/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.js +9 -9
  9. package/build/__tests__/behavioral/FakingEventResponses.test.js +15 -15
  10. package/build/__tests__/behavioral/FixtureFactory.test.d.ts +1 -1
  11. package/build/__tests__/behavioral/FixtureFactory.test.js +14 -14
  12. package/build/__tests__/behavioral/LocationFixture.test.js +17 -17
  13. package/build/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.js +11 -11
  14. package/build/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.js +3 -3
  15. package/build/__tests__/behavioral/MercuryFixture.test.js +28 -28
  16. package/build/__tests__/behavioral/OrganizationFixture.test.js +50 -50
  17. package/build/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.js +3 -3
  18. package/build/__tests__/behavioral/PersonFixture.test.d.ts +1 -1
  19. package/build/__tests__/behavioral/PersonFixture.test.js +37 -37
  20. package/build/__tests__/behavioral/PhoneNumberIncrementor.test.js +22 -22
  21. package/build/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.js +5 -5
  22. package/build/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.js +3 -3
  23. package/build/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.js +5 -5
  24. package/build/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.js +9 -9
  25. package/build/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.js +4 -4
  26. package/build/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.js +2 -2
  27. package/build/__tests__/behavioral/RoleFixture.test.js +15 -15
  28. package/build/__tests__/behavioral/SeedingData.test.js +43 -43
  29. package/build/__tests__/behavioral/SkillFixture.test.js +22 -22
  30. package/build/__tests__/behavioral/StoreFixture.test.d.ts +1 -1
  31. package/build/__tests__/behavioral/StoreFixture.test.js +20 -20
  32. package/build/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.js +11 -11
  33. package/build/__tests__/behavioral/faking/FakeDecorator.test.js +74 -74
  34. package/build/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.js +3 -3
  35. package/build/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.js +3 -3
  36. package/build/__tests__/behavioral/faking/FakeThemeManager.test.d.ts +1 -1
  37. package/build/__tests__/behavioral/faking/FakeThemeManager.test.js +8 -8
  38. package/build/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.js +6 -6
  39. package/build/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.js +15 -15
  40. package/build/__tests__/behavioral/faking/FakingAuthenticator.test.js +5 -5
  41. package/build/__tests__/behavioral/faking/FakingInBeforeEach.test.js +5 -5
  42. package/build/__tests__/behavioral/faking/FakingRoleEvents.test.js +19 -19
  43. package/build/__tests__/behavioral/faking/FakingSkillEvents.test.js +41 -41
  44. package/build/__tests__/behavioral/faking/UpdatePerson.test.js +5 -5
  45. package/build/__tests__/behavioral/faking/UsingFakeDecorators.test.js +60 -60
  46. package/build/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.d.ts +1 -1
  47. package/build/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.js +4 -4
  48. package/build/__tests__/behavioral/faking/WhoAmI.test.js +12 -12
  49. package/build/__tests__/behavioral/maps/SpyingMapUtil.test.js +17 -17
  50. package/build/__tests__/behavioral/seeding/UsingDecorators.test.js +54 -54
  51. package/build/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.js +16 -16
  52. package/build/__tests__/behavioral/views/CheckingPermissions.test.js +30 -30
  53. package/build/__tests__/behavioral/views/FakingSkillViewControllers.test.js +8 -8
  54. package/build/__tests__/behavioral/views/Routing.test.js +30 -30
  55. package/build/__tests__/behavioral/views/TestingScope.test.js +10 -10
  56. package/build/__tests__/behavioral/views/ViewFixture.test.js +107 -107
  57. package/build/__tests__/behavioral/views/WorkingWithTimezones.test.js +10 -10
  58. package/build/__tests__/support/AbstractFakeDecoratorTest.js +4 -4
  59. package/build/esm/__tests__/behavioral/CanUseStoresSetupInBeforeEach.test.js +1 -1
  60. package/build/esm/__tests__/behavioral/DatabaseFixture.test.d.ts +1 -1
  61. package/build/esm/__tests__/behavioral/DatabaseFixture.test.js +1 -1
  62. package/build/esm/__tests__/behavioral/DbResetsAsExpected.test.js +1 -1
  63. package/build/esm/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.js +1 -1
  64. package/build/esm/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.js +1 -1
  65. package/build/esm/__tests__/behavioral/DisablingSchemaValidationOnTest.test.js +1 -1
  66. package/build/esm/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.js +1 -1
  67. package/build/esm/__tests__/behavioral/FakingEventResponses.test.js +1 -1
  68. package/build/esm/__tests__/behavioral/FixtureFactory.test.d.ts +1 -1
  69. package/build/esm/__tests__/behavioral/FixtureFactory.test.js +1 -1
  70. package/build/esm/__tests__/behavioral/LocationFixture.test.js +1 -1
  71. package/build/esm/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.js +1 -1
  72. package/build/esm/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.js +1 -1
  73. package/build/esm/__tests__/behavioral/MercuryFixture.test.js +1 -1
  74. package/build/esm/__tests__/behavioral/OrganizationFixture.test.js +1 -1
  75. package/build/esm/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.js +1 -1
  76. package/build/esm/__tests__/behavioral/PersonFixture.test.d.ts +1 -1
  77. package/build/esm/__tests__/behavioral/PersonFixture.test.js +1 -1
  78. package/build/esm/__tests__/behavioral/PhoneNumberIncrementor.test.js +1 -1
  79. package/build/esm/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.js +1 -1
  80. package/build/esm/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.js +1 -1
  81. package/build/esm/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.js +1 -1
  82. package/build/esm/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.js +1 -1
  83. package/build/esm/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.js +1 -1
  84. package/build/esm/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.js +1 -1
  85. package/build/esm/__tests__/behavioral/RoleFixture.test.js +1 -1
  86. package/build/esm/__tests__/behavioral/SeedingData.test.js +1 -1
  87. package/build/esm/__tests__/behavioral/SkillFixture.test.js +1 -1
  88. package/build/esm/__tests__/behavioral/StoreFixture.test.d.ts +1 -1
  89. package/build/esm/__tests__/behavioral/StoreFixture.test.js +1 -1
  90. package/build/esm/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.js +1 -1
  91. package/build/esm/__tests__/behavioral/faking/FakeDecorator.test.js +1 -1
  92. package/build/esm/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.js +1 -1
  93. package/build/esm/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.js +1 -1
  94. package/build/esm/__tests__/behavioral/faking/FakeThemeManager.test.d.ts +1 -1
  95. package/build/esm/__tests__/behavioral/faking/FakeThemeManager.test.js +1 -1
  96. package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.js +1 -1
  97. package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.js +1 -1
  98. package/build/esm/__tests__/behavioral/faking/FakingAuthenticator.test.js +1 -1
  99. package/build/esm/__tests__/behavioral/faking/FakingInBeforeEach.test.js +1 -1
  100. package/build/esm/__tests__/behavioral/faking/FakingRoleEvents.test.js +1 -1
  101. package/build/esm/__tests__/behavioral/faking/FakingSkillEvents.test.js +1 -1
  102. package/build/esm/__tests__/behavioral/faking/UpdatePerson.test.js +1 -1
  103. package/build/esm/__tests__/behavioral/faking/UsingFakeDecorators.test.js +1 -1
  104. package/build/esm/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.d.ts +1 -1
  105. package/build/esm/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.js +1 -1
  106. package/build/esm/__tests__/behavioral/faking/WhoAmI.test.js +1 -1
  107. package/build/esm/__tests__/behavioral/maps/SpyingMapUtil.test.js +1 -1
  108. package/build/esm/__tests__/behavioral/seeding/UsingDecorators.test.js +1 -1
  109. package/build/esm/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.js +1 -1
  110. package/build/esm/__tests__/behavioral/views/CheckingPermissions.test.js +1 -1
  111. package/build/esm/__tests__/behavioral/views/FakingSkillViewControllers.test.js +1 -1
  112. package/build/esm/__tests__/behavioral/views/Routing.test.js +1 -1
  113. package/build/esm/__tests__/behavioral/views/TestingScope.test.js +1 -1
  114. package/build/esm/__tests__/behavioral/views/ViewFixture.test.js +1 -1
  115. package/build/esm/__tests__/behavioral/views/WorkingWithTimezones.test.js +1 -1
  116. package/build/esm/__tests__/support/AbstractFakeDecoratorTest.js +1 -1
  117. package/build/esm/tests/AbstractSpruceFixtureTest.js +1 -1
  118. package/build/esm/tests/SpyAuthorizer.js +1 -1
  119. package/build/esm/tests/decorators/fake.js +1 -1
  120. package/build/esm/tests/decorators/install.js +1 -1
  121. package/build/esm/tests/decorators/login.js +1 -1
  122. package/build/esm/tests/decorators/seed.js +1 -1
  123. package/build/esm/tests/fixtures/LocationFixture.js +1 -1
  124. package/build/esm/tests/fixtures/RoleFixture.js +1 -1
  125. package/build/esm/tests/fixtures/SeedFixture.js +1 -1
  126. package/build/tests/AbstractSpruceFixtureTest.js +3 -3
  127. package/build/tests/SpyAuthorizer.js +3 -3
  128. package/build/tests/decorators/fake.js +20 -20
  129. package/build/tests/decorators/install.js +3 -3
  130. package/build/tests/decorators/login.js +4 -4
  131. package/build/tests/decorators/seed.js +2 -2
  132. package/build/tests/fixtures/LocationFixture.js +3 -3
  133. package/build/tests/fixtures/RoleFixture.js +2 -2
  134. package/build/tests/fixtures/SeedFixture.js +2 -2
  135. package/package.json +5 -5
@@ -9,33 +9,33 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
9
9
  return (mod && mod.__esModule) ? mod : { "default": mod };
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- const test_1 = require("@sprucelabs/test");
13
12
  const test_utils_1 = require("@sprucelabs/test-utils");
13
+ const test_utils_2 = require("@sprucelabs/test-utils");
14
14
  const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
15
15
  const ViewFixture_1 = __importDefault(require("../../../tests/fixtures/ViewFixture"));
16
16
  const SpyAuthorizer_1 = __importDefault(require("../../../tests/SpyAuthorizer"));
17
17
  class CheckingPermissionsTest extends AbstractSpruceFixtureTest_1.default {
18
18
  static async beforeEach() {
19
19
  await super.beforeEach();
20
- this.contractId = (0, test_utils_1.generateId)();
20
+ this.contractId = (0, test_utils_2.generateId)();
21
21
  }
22
22
  static async canCreateCheckingPermissions() {
23
23
  const instance = CheckingPermissionsTest.getInstance();
24
- test_1.assert.isTrue(instance instanceof SpyAuthorizer_1.default);
24
+ test_utils_1.assert.isTrue(instance instanceof SpyAuthorizer_1.default);
25
25
  }
26
26
  static async sharesInstances() {
27
- test_1.assert.isEqual(this.getInstance(), this.getInstance());
27
+ test_utils_1.assert.isEqual(this.getInstance(), this.getInstance());
28
28
  }
29
29
  static async viewsFixtureResetsInstance() {
30
30
  const instance = this.getInstance();
31
31
  await ViewFixture_1.default.beforeEach();
32
- test_1.assert.isNotEqual(this.getInstance(), instance);
32
+ test_utils_1.assert.isNotEqual(this.getInstance(), instance);
33
33
  }
34
34
  static async throwsWhenMissingOnCan() {
35
- const err = await test_1.assert.doesThrowAsync(() =>
35
+ const err = await test_utils_1.assert.doesThrowAsync(() =>
36
36
  //@ts-ignore
37
37
  this.getInstance().can());
38
- test_utils_1.errorAssert.assertError(err, 'MISSING_PARAMETERS', {
38
+ test_utils_2.errorAssert.assertError(err, 'MISSING_PARAMETERS', {
39
39
  parameters: ['contractId', 'permissionIds'],
40
40
  });
41
41
  }
@@ -67,7 +67,7 @@ class CheckingPermissionsTest extends AbstractSpruceFixtureTest_1.default {
67
67
  permissionIds.forEach((id) => ((expected[id] = can), faked.push({ id, can })));
68
68
  this.fakePermissions(faked);
69
69
  const results = await this.can(permissionIds);
70
- test_1.assert.isEqualDeep(results, expected);
70
+ test_utils_1.assert.isEqualDeep(results, expected);
71
71
  }
72
72
  static async fixtureAndLoadOptionsShareAuthorizer() {
73
73
  this.views = this.Fixture('view', {
@@ -75,13 +75,13 @@ class CheckingPermissionsTest extends AbstractSpruceFixtureTest_1.default {
75
75
  });
76
76
  const auth = this.views.getAuthorizer();
77
77
  const router = this.views.getRouter();
78
- test_1.assert.isEqual(auth, router.buildLoadOptions().authorizer);
78
+ test_utils_1.assert.isEqual(auth, router.buildLoadOptions().authorizer);
79
79
  }
80
80
  static async authorizerClobbersMatchingContracts() {
81
81
  this.fakePermissions([{ id: 'test', can: true }]);
82
82
  this.fakePermissions([{ id: 'test', can: false }]);
83
83
  const perms = await this.can(['test']);
84
- test_1.assert.isFalse(perms['test']);
84
+ test_utils_1.assert.isFalse(perms['test']);
85
85
  }
86
86
  static async canHandleMulplePermissionsWithDifferentContracts() {
87
87
  const firstId = this.contractId;
@@ -90,16 +90,16 @@ class CheckingPermissionsTest extends AbstractSpruceFixtureTest_1.default {
90
90
  this.fakePermissions([{ id: 'test', can: false }]);
91
91
  this.contractId = firstId;
92
92
  const perms = await this.can(['test']);
93
- test_1.assert.isTrue(perms['test']);
93
+ test_utils_1.assert.isTrue(perms['test']);
94
94
  }
95
95
  static async assertPermNotFound(checkIds, id) {
96
- await test_1.assert.doesThrowAsync(() => this.can(checkIds), id);
96
+ await test_utils_1.assert.doesThrowAsync(() => this.can(checkIds), id);
97
97
  }
98
98
  static changeContractId() {
99
- this.contractId = (0, test_utils_1.generateId)();
99
+ this.contractId = (0, test_utils_2.generateId)();
100
100
  }
101
101
  static async assertThrowsFakeError() {
102
- await test_1.assert.doesThrowAsync(() => this.can(['test']), `Contract by the id '${this.contractId}'`);
102
+ await test_utils_1.assert.doesThrowAsync(() => this.can(['test']), `Contract by the id '${this.contractId}'`);
103
103
  }
104
104
  static fakePermissions(faked) {
105
105
  this.getInstance().fakePermissions({
@@ -118,45 +118,45 @@ class CheckingPermissionsTest extends AbstractSpruceFixtureTest_1.default {
118
118
  }
119
119
  }
120
120
  __decorate([
121
- (0, test_1.test)()
121
+ (0, test_utils_1.test)()
122
122
  ], CheckingPermissionsTest, "canCreateCheckingPermissions", null);
123
123
  __decorate([
124
- (0, test_1.test)()
124
+ (0, test_utils_1.test)()
125
125
  ], CheckingPermissionsTest, "sharesInstances", null);
126
126
  __decorate([
127
- (0, test_1.test)()
127
+ (0, test_utils_1.test)()
128
128
  ], CheckingPermissionsTest, "viewsFixtureResetsInstance", null);
129
129
  __decorate([
130
- (0, test_1.test)()
130
+ (0, test_utils_1.test)()
131
131
  ], CheckingPermissionsTest, "throwsWhenMissingOnCan", null);
132
132
  __decorate([
133
- (0, test_1.test)()
133
+ (0, test_utils_1.test)()
134
134
  ], CheckingPermissionsTest, "throwsWhenNotSettingResponse", null);
135
135
  __decorate([
136
- (0, test_1.test)()
136
+ (0, test_utils_1.test)()
137
137
  ], CheckingPermissionsTest, "throwsWhenContractIdNotFaked", null);
138
138
  __decorate([
139
- (0, test_1.test)()
139
+ (0, test_utils_1.test)()
140
140
  ], CheckingPermissionsTest, "doesNotThrowWhenMatchingSecondContractId", null);
141
141
  __decorate([
142
- (0, test_1.test)()
142
+ (0, test_utils_1.test)()
143
143
  ], CheckingPermissionsTest, "throwsWhenNotFindingPermissionId", null);
144
144
  __decorate([
145
- (0, test_1.test)()
145
+ (0, test_utils_1.test)()
146
146
  ], CheckingPermissionsTest, "throwsWhenFindingLaterMissingPermId", null);
147
147
  __decorate([
148
- (0, test_1.test)('returns false on can 1', ['first', 'second', 'third'], false),
149
- (0, test_1.test)('returns false on can 2', ['third', 'fourth'], false),
150
- (0, test_1.test)('returns false on can 3', ['first', 'second', 'third'], true),
151
- (0, test_1.test)('returns false on can 4', ['third', 'fourth'], true)
148
+ (0, test_utils_1.test)('returns false on can 1', ['first', 'second', 'third'], false),
149
+ (0, test_utils_1.test)('returns false on can 2', ['third', 'fourth'], false),
150
+ (0, test_utils_1.test)('returns false on can 3', ['first', 'second', 'third'], true),
151
+ (0, test_utils_1.test)('returns false on can 4', ['third', 'fourth'], true)
152
152
  ], CheckingPermissionsTest, "returnsFakedResponses", null);
153
153
  __decorate([
154
- (0, test_1.test)()
154
+ (0, test_utils_1.test)()
155
155
  ], CheckingPermissionsTest, "fixtureAndLoadOptionsShareAuthorizer", null);
156
156
  __decorate([
157
- (0, test_1.test)()
157
+ (0, test_utils_1.test)()
158
158
  ], CheckingPermissionsTest, "authorizerClobbersMatchingContracts", null);
159
159
  __decorate([
160
- (0, test_1.test)()
160
+ (0, test_utils_1.test)()
161
161
  ], CheckingPermissionsTest, "canHandleMulplePermissionsWithDifferentContracts", null);
162
162
  exports.default = CheckingPermissionsTest;
@@ -11,7 +11,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  const heartwood_view_controllers_1 = require("@sprucelabs/heartwood-view-controllers");
13
13
  const schema_1 = require("@sprucelabs/schema");
14
- const test_1 = require("@sprucelabs/test");
14
+ const test_utils_1 = require("@sprucelabs/test-utils");
15
15
  const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
16
16
  const Fake_svc_1 = __importDefault(require("../../../tests/Fake.svc"));
17
17
  class FakingSkillViewControllersTest extends AbstractSpruceFixtureTest_1.default {
@@ -30,26 +30,26 @@ class FakingSkillViewControllersTest extends AbstractSpruceFixtureTest_1.default
30
30
  }
31
31
  static async passesThroughConstructorAptions(options) {
32
32
  const vc = this.viewFixture.Controller('fake', options);
33
- test_1.assert.doesInclude(vc.constructorOptions, options);
33
+ test_utils_1.assert.doesInclude(vc.constructorOptions, options);
34
34
  }
35
35
  static async passesThroughLoadArgs(args) {
36
36
  const vc = this.viewFixture.Controller('fake', {});
37
37
  await this.viewFixture.load(vc, args);
38
- test_1.assert.isEqualDeep(vc.args, args);
38
+ test_utils_1.assert.isEqualDeep(vc.args, args);
39
39
  }
40
40
  }
41
41
  FakingSkillViewControllersTest.controllerMap = {
42
42
  fake: Fake_svc_1.default,
43
43
  };
44
44
  __decorate([
45
- (0, test_1.test)()
45
+ (0, test_utils_1.test)()
46
46
  ], FakingSkillViewControllersTest, "canRenderkFakeSkillViewController", null);
47
47
  __decorate([
48
- (0, test_1.test)('passed constructor options 1', { hello: 'world' }),
49
- (0, test_1.test)('passed constructor options 2', { taco: 'bell' })
48
+ (0, test_utils_1.test)('passed constructor options 1', { hello: 'world' }),
49
+ (0, test_utils_1.test)('passed constructor options 2', { taco: 'bell' })
50
50
  ], FakingSkillViewControllersTest, "passesThroughConstructorAptions", null);
51
51
  __decorate([
52
- (0, test_1.test)('passes args 1', { hello: 'world' }),
53
- (0, test_1.test)('passes args 2', { cheesey: 'burrito' })
52
+ (0, test_utils_1.test)('passes args 1', { hello: 'world' }),
53
+ (0, test_utils_1.test)('passes args 2', { cheesey: 'burrito' })
54
54
  ], FakingSkillViewControllersTest, "passesThroughLoadArgs", null);
55
55
  exports.default = FakingSkillViewControllersTest;
@@ -13,8 +13,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
13
13
  const calendar_utils_1 = require("@sprucelabs/calendar-utils");
14
14
  const heartwood_view_controllers_1 = require("@sprucelabs/heartwood-view-controllers");
15
15
  const spruce_skill_utils_1 = require("@sprucelabs/spruce-skill-utils");
16
- const test_1 = require("@sprucelabs/test");
17
16
  const test_utils_1 = require("@sprucelabs/test-utils");
17
+ const test_utils_2 = require("@sprucelabs/test-utils");
18
18
  const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
19
19
  const Fake_svc_1 = __importDefault(require("../../../tests/Fake.svc"));
20
20
  const TestRouter_1 = __importDefault(require("../../../tests/routers/TestRouter"));
@@ -29,33 +29,33 @@ class RoutingTest extends AbstractSpruceFixtureTest_1.default {
29
29
  this.factory = fixture.getFactory();
30
30
  }
31
31
  static async throwsWithBadDestination() {
32
- const err = await test_1.assert.doesThrowAsync(() =>
32
+ const err = await test_utils_1.assert.doesThrowAsync(() =>
33
33
  //@ts-ignore
34
34
  this.assertRedirects(() => this.router.redirect('waka.waka')));
35
- test_utils_1.errorAssert.assertError(err, 'INVALID_VIEW_CONTROLLER_NAME', {
35
+ test_utils_2.errorAssert.assertError(err, 'INVALID_VIEW_CONTROLLER_NAME', {
36
36
  name: 'waka.waka',
37
37
  });
38
38
  }
39
39
  static async getPresentVcIsEmptyToStart() {
40
- test_1.assert.isFalsy(this.router.getPresentVc());
40
+ test_utils_1.assert.isFalsy(this.router.getPresentVc());
41
41
  }
42
42
  static async canRedirectToGoodSvcWithoutNamespace(id, Vc) {
43
43
  await this.assertRedirects(() => this.router.redirect(id, {}));
44
44
  const vc = this.router.getPresentVc();
45
- test_1.assert.isTrue(vc instanceof Vc);
45
+ test_utils_1.assert.isTrue(vc instanceof Vc);
46
46
  }
47
47
  static async redirectTriggersLoadWithExpectedItems(args) {
48
48
  TestRouter_1.default.setShouldLoadDestinationVc(false);
49
49
  //@ts-ignore
50
50
  const vc = await this.assertRedirects(() => this.router.redirect('spruceTestFixtures.spy', args));
51
51
  const lastLoad = vc.loads.pop();
52
- test_1.assert.isFalsy(lastLoad);
52
+ test_utils_1.assert.isFalsy(lastLoad);
53
53
  }
54
54
  static async redirectByDefaultDoesNotLoadWithExpectedItems(args) {
55
55
  //@ts-ignore
56
56
  const vc = await this.assertRedirects(() => this.router.redirect('spruceTestFixtures.spy', args));
57
57
  const lastLoad = vc.loads.pop();
58
- test_1.assert.isFalsy(lastLoad);
58
+ test_utils_1.assert.isFalsy(lastLoad);
59
59
  }
60
60
  static async canHookIntoRedirectEvents(expectedArgs) {
61
61
  let wasHit = false;
@@ -69,15 +69,15 @@ class RoutingTest extends AbstractSpruceFixtureTest_1.default {
69
69
  passedArgs = args;
70
70
  });
71
71
  await this.assertRedirects(() => this.router.redirect('spruceTestFixtures.book', expectedArgs));
72
- test_1.assert.isTrue(wasHit);
73
- test_1.assert.isEqual(passedId, 'spruceTestFixtures.book');
74
- test_1.assert.isTruthy(passedVc);
75
- test_1.assert.isTrue(passedVc instanceof Book_svc_1.default);
76
- test_1.assert.isEqualDeep(passedArgs, expectedArgs);
72
+ test_utils_1.assert.isTrue(wasHit);
73
+ test_utils_1.assert.isEqual(passedId, 'spruceTestFixtures.book');
74
+ test_utils_1.assert.isTruthy(passedVc);
75
+ test_utils_1.assert.isTrue(passedVc instanceof Book_svc_1.default);
76
+ test_utils_1.assert.isEqualDeep(passedArgs, expectedArgs);
77
77
  }
78
78
  static async canFakeRedirectToHeartwoodRoot() {
79
79
  const svc = await this.assertRedirects(() => this.router.redirect('heartwood.root'));
80
- test_1.assert.isTrue(svc instanceof Fake_svc_1.default);
80
+ test_utils_1.assert.isTrue(svc instanceof Fake_svc_1.default);
81
81
  }
82
82
  static async canSuppressBadControllerIdOnRedirect() {
83
83
  TestRouter_1.default.setShouldThrowWhenRedirectingToBadSvc(false);
@@ -87,14 +87,14 @@ class RoutingTest extends AbstractSpruceFixtureTest_1.default {
87
87
  await this.assertRedirects(() => this.router.redirect(id));
88
88
  }
89
89
  static async shouldThrowWithBadSvcBecauseTestRouterIsReset() {
90
- await test_1.assert.doesThrowAsync(() =>
90
+ await test_utils_1.assert.doesThrowAsync(() =>
91
91
  //@ts-ignore
92
92
  this.router.redirect('waka.waka'));
93
93
  }
94
94
  static testRouterBuildsOptionsWithLocaleAndAuthorizer() {
95
95
  const options = this.router.buildLoadOptions();
96
- test_1.assert.isTrue(options.locale instanceof calendar_utils_1.LocaleImpl);
97
- test_1.assert.isTrue(options.authorizer instanceof SpyAuthorizer_1.default);
96
+ test_utils_1.assert.isTrue(options.locale instanceof calendar_utils_1.LocaleImpl);
97
+ test_utils_1.assert.isTrue(options.authorizer instanceof SpyAuthorizer_1.default);
98
98
  }
99
99
  static async assertRedirects(action) {
100
100
  return heartwood_view_controllers_1.vcAssert.assertActionRedirects({
@@ -105,37 +105,37 @@ class RoutingTest extends AbstractSpruceFixtureTest_1.default {
105
105
  }
106
106
  RoutingTest.vcDir = spruce_skill_utils_1.diskUtil.resolvePath(__dirname, '..', '..', 'testDirsAndFiles', 'skill', 'build');
107
107
  __decorate([
108
- (0, test_1.test)()
108
+ (0, test_utils_1.test)()
109
109
  ], RoutingTest, "throwsWithBadDestination", null);
110
110
  __decorate([
111
- (0, test_1.test)()
111
+ (0, test_utils_1.test)()
112
112
  ], RoutingTest, "getPresentVcIsEmptyToStart", null);
113
113
  __decorate([
114
- (0, test_1.test)('can get book svc', 'spruceTestFixtures.book', Book_svc_1.default),
115
- (0, test_1.test)('can get spy svc', 'spruceTestFixtures.spy', Spy_svc_1.default)
114
+ (0, test_utils_1.test)('can get book svc', 'spruceTestFixtures.book', Book_svc_1.default),
115
+ (0, test_utils_1.test)('can get spy svc', 'spruceTestFixtures.spy', Spy_svc_1.default)
116
116
  ], RoutingTest, "canRedirectToGoodSvcWithoutNamespace", null);
117
117
  __decorate([
118
- (0, test_1.test)('redirect calls load on destination vc if set 1', { hey: 'there' }),
119
- (0, test_1.test)('redirect calls load on destination vc if set 2', { what: 'the!?' })
118
+ (0, test_utils_1.test)('redirect calls load on destination vc if set 1', { hey: 'there' }),
119
+ (0, test_utils_1.test)('redirect calls load on destination vc if set 2', { what: 'the!?' })
120
120
  ], RoutingTest, "redirectTriggersLoadWithExpectedItems", null);
121
121
  __decorate([
122
- (0, test_1.test)('redirect does not call load on destination vc 1', { hey: 'there' }),
123
- (0, test_1.test)('redirect does not call load on destination vc 2', { what: 'the!?' })
122
+ (0, test_utils_1.test)('redirect does not call load on destination vc 1', { hey: 'there' }),
123
+ (0, test_utils_1.test)('redirect does not call load on destination vc 2', { what: 'the!?' })
124
124
  ], RoutingTest, "redirectByDefaultDoesNotLoadWithExpectedItems", null);
125
125
  __decorate([
126
- (0, test_1.test)('can hook into redirect no args', undefined),
127
- (0, test_1.test)('can hook into redirect args 1', { taco: 'bell' })
126
+ (0, test_utils_1.test)('can hook into redirect no args', undefined),
127
+ (0, test_utils_1.test)('can hook into redirect args 1', { taco: 'bell' })
128
128
  ], RoutingTest, "canHookIntoRedirectEvents", null);
129
129
  __decorate([
130
- (0, test_1.test)()
130
+ (0, test_utils_1.test)()
131
131
  ], RoutingTest, "canFakeRedirectToHeartwoodRoot", null);
132
132
  __decorate([
133
- (0, test_1.test)()
133
+ (0, test_utils_1.test)()
134
134
  ], RoutingTest, "canSuppressBadControllerIdOnRedirect", null);
135
135
  __decorate([
136
- (0, test_1.test)()
136
+ (0, test_utils_1.test)()
137
137
  ], RoutingTest, "shouldThrowWithBadSvcBecauseTestRouterIsReset", null);
138
138
  __decorate([
139
- (0, test_1.test)()
139
+ (0, test_utils_1.test)()
140
140
  ], RoutingTest, "testRouterBuildsOptionsWithLocaleAndAuthorizer", null);
141
141
  exports.default = RoutingTest;
@@ -9,7 +9,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
9
9
  return (mod && mod.__esModule) ? mod : { "default": mod };
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- const test_1 = require("@sprucelabs/test");
12
+ const test_utils_1 = require("@sprucelabs/test-utils");
13
13
  const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
14
14
  const constants_1 = require("../../../tests/constants");
15
15
  const login_1 = __importDefault(require("../../../tests/decorators/login"));
@@ -25,41 +25,41 @@ let TestingScopeTest = class TestingScopeTest extends AbstractSpruceFixtureTest_
25
25
  this.scope.setCurrentOrganization('aoeu');
26
26
  this.scope.clearSession();
27
27
  const location = await this.scope.getCurrentLocation();
28
- test_1.assert.isFalsy(location);
28
+ test_utils_1.assert.isFalsy(location);
29
29
  }
30
30
  static async canSetCurrentOrgToNull() {
31
31
  this.scope.setCurrentOrganization(null);
32
32
  const org = await this.scope.getCurrentOrganization();
33
- test_1.assert.isNull(org);
33
+ test_utils_1.assert.isNull(org);
34
34
  }
35
35
  static async canSetCurrentLocationToNull() {
36
36
  this.scope.setCurrentLocation(null);
37
37
  const org = await this.organizations.getNewestOrganization();
38
- test_1.assert.isTruthy(org);
38
+ test_utils_1.assert.isTruthy(org);
39
39
  const location = await this.scope.getCurrentLocation();
40
- test_1.assert.isNull(location);
40
+ test_utils_1.assert.isNull(location);
41
41
  }
42
42
  static async clearsLocationIdWhenSettingOrgId() {
43
43
  this.scope.setCurrentLocation('aoeu');
44
44
  this.scope.setCurrentOrganization('aoeu');
45
45
  //@ts-ignore
46
- test_1.assert.isFalsy(this.scope.currentLocationId);
46
+ test_utils_1.assert.isFalsy(this.scope.currentLocationId);
47
47
  }
48
48
  };
49
49
  __decorate([
50
- (0, test_1.test)()
50
+ (0, test_utils_1.test)()
51
51
  ], TestingScopeTest, "canResetScope", null);
52
52
  __decorate([
53
- (0, test_1.test)(),
53
+ (0, test_utils_1.test)(),
54
54
  (0, seed_1.default)('organizations', 1)
55
55
  ], TestingScopeTest, "canSetCurrentOrgToNull", null);
56
56
  __decorate([
57
- (0, test_1.test)(),
57
+ (0, test_utils_1.test)(),
58
58
  (0, seed_1.default)('organizations', 1),
59
59
  (0, seed_1.default)('locations', 1)
60
60
  ], TestingScopeTest, "canSetCurrentLocationToNull", null);
61
61
  __decorate([
62
- (0, test_1.test)()
62
+ (0, test_utils_1.test)()
63
63
  ], TestingScopeTest, "clearsLocationIdWhenSettingOrgId", null);
64
64
  TestingScopeTest = __decorate([
65
65
  (0, login_1.default)(constants_1.DEMO_NUMBER_SCOPE)