|
1 | | -import { afterAll, beforeAll, describe, expect, it, Mock, vitest } from 'vitest'; |
| 1 | +import { afterAll, beforeAll, describe, expect, it, vitest } from 'vitest'; |
2 | 2 |
|
3 | 3 | vitest.mock('../typeguards/isNestSupabaseConfigFactoryAsyncOptions'); |
4 | 4 |
|
@@ -55,9 +55,7 @@ describe(SupabaseCoreModule.name, () => { |
55 | 55 | beforeAll(() => { |
56 | 56 | nestSupabaseConfigFactoryAsyncOptionsFixture = NestSupabaseConfigFactoryAsyncOptionsFixtures.any; |
57 | 57 |
|
58 | | - ( |
59 | | - isNestSupabaseConfigFactoryAsyncOptions as unknown as Mock<typeof isNestSupabaseConfigFactoryAsyncOptions> |
60 | | - ).mockReturnValueOnce(true); |
| 58 | + vitest.mocked(isNestSupabaseConfigFactoryAsyncOptions).mockReturnValueOnce(true); |
61 | 59 |
|
62 | 60 | result = SupabaseCoreModule.forRootAsync(nestSupabaseConfigFactoryAsyncOptionsFixture); |
63 | 61 | }); |
@@ -99,9 +97,7 @@ describe(SupabaseCoreModule.name, () => { |
99 | 97 | beforeAll(() => { |
100 | 98 | nestSupabaseConfigFactoryAsyncOptionsFixture = NestSupabaseConfigFactoryAsyncOptionsFixtures.withoutInject; |
101 | 99 |
|
102 | | - ( |
103 | | - isNestSupabaseConfigFactoryAsyncOptions as unknown as Mock<typeof isNestSupabaseConfigFactoryAsyncOptions> |
104 | | - ).mockReturnValueOnce(true); |
| 100 | + vitest.mocked(isNestSupabaseConfigFactoryAsyncOptions).mockReturnValueOnce(true); |
105 | 101 |
|
106 | 102 | result = SupabaseCoreModule.forRootAsync(nestSupabaseConfigFactoryAsyncOptionsFixture); |
107 | 103 | }); |
@@ -143,9 +139,7 @@ describe(SupabaseCoreModule.name, () => { |
143 | 139 | beforeAll(() => { |
144 | 140 | nestSupabaseConfigFactoryAsyncOptionsFixture = NestSupabaseConfigFactoryAsyncOptionsFixtures.withoutImports; |
145 | 141 |
|
146 | | - ( |
147 | | - isNestSupabaseConfigFactoryAsyncOptions as unknown as Mock<typeof isNestSupabaseConfigFactoryAsyncOptions> |
148 | | - ).mockReturnValueOnce(true); |
| 142 | + vitest.mocked(isNestSupabaseConfigFactoryAsyncOptions).mockReturnValueOnce(true); |
149 | 143 |
|
150 | 144 | result = SupabaseCoreModule.forRootAsync(nestSupabaseConfigFactoryAsyncOptionsFixture); |
151 | 145 | }); |
@@ -196,9 +190,7 @@ describe(SupabaseCoreModule.name, () => { |
196 | 190 | useClass: NestSupabaseConfigFactoryTest, |
197 | 191 | }; |
198 | 192 |
|
199 | | - ( |
200 | | - isNestSupabaseConfigFactoryAsyncOptions as unknown as Mock<typeof isNestSupabaseConfigFactoryAsyncOptions> |
201 | | - ).mockReturnValueOnce(false); |
| 193 | + vitest.mocked(isNestSupabaseConfigFactoryAsyncOptions).mockReturnValueOnce(false); |
202 | 194 |
|
203 | 195 | result = SupabaseCoreModule.forRootAsync(nestSupabaseConfigClassAsyncOptionsFixture); |
204 | 196 | }); |
|
0 commit comments