@geekmidas/testkit 9.0.2 → 10.0.0-alpha.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 (125) hide show
  1. package/dist/{Factory-CUM2767q.d.cts → Factory-C6W78ulZ.d.mts} +2 -2
  2. package/dist/{Factory-ClyZLRsO.d.mts.map → Factory-C6W78ulZ.d.mts.map} +1 -1
  3. package/dist/{Factory-ClyZLRsO.d.mts → Factory-DSEADOaF.d.cts} +2 -2
  4. package/dist/{Factory-CUM2767q.d.cts.map → Factory-DSEADOaF.d.cts.map} +1 -1
  5. package/dist/Factory.d.cts +2 -2
  6. package/dist/Factory.d.mts +2 -2
  7. package/dist/{KyselyFactory-OMwcuAX_.d.cts → KyselyFactory-Cc2UmOJk.d.mts} +3 -3
  8. package/dist/{KyselyFactory-CTZmiGI9.d.mts.map → KyselyFactory-Cc2UmOJk.d.mts.map} +1 -1
  9. package/dist/{KyselyFactory-CTZmiGI9.d.mts → KyselyFactory-DzH0N1zr.d.cts} +3 -3
  10. package/dist/{KyselyFactory-OMwcuAX_.d.cts.map → KyselyFactory-DzH0N1zr.d.cts.map} +1 -1
  11. package/dist/KyselyFactory.d.cts +3 -3
  12. package/dist/KyselyFactory.d.mts +3 -3
  13. package/dist/{ObjectionFactory-DDrKwAoO.d.mts → ObjectionFactory-BYnPr9ZP.d.mts} +3 -3
  14. package/dist/{ObjectionFactory-DDrKwAoO.d.mts.map → ObjectionFactory-BYnPr9ZP.d.mts.map} +1 -1
  15. package/dist/{ObjectionFactory-DvmZVHhe.d.cts → ObjectionFactory-BmKdG0nT.d.cts} +3 -3
  16. package/dist/{ObjectionFactory-DvmZVHhe.d.cts.map → ObjectionFactory-BmKdG0nT.d.cts.map} +1 -1
  17. package/dist/ObjectionFactory.d.cts +3 -3
  18. package/dist/ObjectionFactory.d.mts +3 -3
  19. package/dist/{VitestKyselyTransactionIsolator-CfSMOFlN.mjs → VitestKyselyTransactionIsolator-1Saieke7.mjs} +10 -3
  20. package/dist/VitestKyselyTransactionIsolator-1Saieke7.mjs.map +1 -0
  21. package/dist/{VitestKyselyTransactionIsolator-0CqOsuc9.cjs → VitestKyselyTransactionIsolator-BjJSXryR.cjs} +10 -3
  22. package/dist/VitestKyselyTransactionIsolator-BjJSXryR.cjs.map +1 -0
  23. package/dist/{VitestKyselyTransactionIsolator-CduJlHoT.d.cts → VitestKyselyTransactionIsolator-CwlTo6yf.d.mts} +8 -3
  24. package/dist/VitestKyselyTransactionIsolator-CwlTo6yf.d.mts.map +1 -0
  25. package/dist/{VitestKyselyTransactionIsolator-Cswnnj0k.d.mts → VitestKyselyTransactionIsolator-DJasVuIZ.d.cts} +8 -3
  26. package/dist/VitestKyselyTransactionIsolator-DJasVuIZ.d.cts.map +1 -0
  27. package/dist/VitestKyselyTransactionIsolator.cjs +2 -2
  28. package/dist/VitestKyselyTransactionIsolator.d.cts +2 -2
  29. package/dist/VitestKyselyTransactionIsolator.d.mts +2 -2
  30. package/dist/VitestKyselyTransactionIsolator.mjs +2 -2
  31. package/dist/{VitestObjectionTransactionIsolator-CNo40EdC.mjs → VitestObjectionTransactionIsolator-B_VSWFum.mjs} +2 -2
  32. package/dist/{VitestObjectionTransactionIsolator-CNo40EdC.mjs.map → VitestObjectionTransactionIsolator-B_VSWFum.mjs.map} +1 -1
  33. package/dist/{VitestObjectionTransactionIsolator-BXoR6xdG.d.cts → VitestObjectionTransactionIsolator-CTTjvTPO.d.cts} +2 -2
  34. package/dist/{VitestObjectionTransactionIsolator-BXoR6xdG.d.cts.map → VitestObjectionTransactionIsolator-CTTjvTPO.d.cts.map} +1 -1
  35. package/dist/{VitestObjectionTransactionIsolator-x6hY5j4u.d.mts → VitestObjectionTransactionIsolator-CyZG6nq4.d.mts} +2 -2
  36. package/dist/{VitestObjectionTransactionIsolator-x6hY5j4u.d.mts.map → VitestObjectionTransactionIsolator-CyZG6nq4.d.mts.map} +1 -1
  37. package/dist/{VitestObjectionTransactionIsolator-B5J9jjKq.cjs → VitestObjectionTransactionIsolator-DDoJTu7e.cjs} +2 -2
  38. package/dist/{VitestObjectionTransactionIsolator-B5J9jjKq.cjs.map → VitestObjectionTransactionIsolator-DDoJTu7e.cjs.map} +1 -1
  39. package/dist/VitestObjectionTransactionIsolator.cjs +2 -2
  40. package/dist/VitestObjectionTransactionIsolator.d.cts +2 -2
  41. package/dist/VitestObjectionTransactionIsolator.d.mts +2 -2
  42. package/dist/VitestObjectionTransactionIsolator.mjs +2 -2
  43. package/dist/{VitestTransactionIsolator-BNWJqh9f.d.mts → VitestTransactionIsolator-BLaw80cx.d.mts} +20 -4
  44. package/dist/VitestTransactionIsolator-BLaw80cx.d.mts.map +1 -0
  45. package/dist/{VitestTransactionIsolator-D6ZxLWys.mjs → VitestTransactionIsolator-CvwPecpl.mjs} +17 -4
  46. package/dist/VitestTransactionIsolator-CvwPecpl.mjs.map +1 -0
  47. package/dist/{VitestTransactionIsolator-CtZaOUjH.cjs → VitestTransactionIsolator-DyiX-QtK.cjs} +17 -4
  48. package/dist/VitestTransactionIsolator-DyiX-QtK.cjs.map +1 -0
  49. package/dist/{VitestTransactionIsolator-CSroc7Df.d.cts → VitestTransactionIsolator-glcxyS_R.d.cts} +20 -4
  50. package/dist/VitestTransactionIsolator-glcxyS_R.d.cts.map +1 -0
  51. package/dist/VitestTransactionIsolator.cjs +1 -1
  52. package/dist/VitestTransactionIsolator.d.cts +2 -2
  53. package/dist/VitestTransactionIsolator.d.mts +2 -2
  54. package/dist/VitestTransactionIsolator.mjs +1 -1
  55. package/dist/better-auth.d.cts +2 -2
  56. package/dist/better-auth.d.mts +2 -2
  57. package/dist/{faker-BcjUfHxx.d.mts → faker-D9gz7KjY.d.mts} +3 -3
  58. package/dist/{faker-BcjUfHxx.d.mts.map → faker-D9gz7KjY.d.mts.map} +1 -1
  59. package/dist/{faker-zVCm31nU.d.cts → faker-km9UhOS6.d.cts} +3 -3
  60. package/dist/{faker-zVCm31nU.d.cts.map → faker-km9UhOS6.d.cts.map} +1 -1
  61. package/dist/faker.d.cts +1 -1
  62. package/dist/faker.d.mts +1 -1
  63. package/dist/kysely.cjs +2 -2
  64. package/dist/kysely.d.cts +5 -5
  65. package/dist/kysely.d.mts +5 -5
  66. package/dist/kysely.mjs +2 -2
  67. package/dist/objection.cjs +2 -2
  68. package/dist/objection.d.cts +5 -5
  69. package/dist/objection.d.mts +5 -5
  70. package/dist/objection.mjs +2 -2
  71. package/dist/requestContext.cjs +1 -1
  72. package/dist/requestContext.d.cts +1 -1
  73. package/dist/requestContext.d.mts +1 -1
  74. package/dist/requestContext.mjs +1 -1
  75. package/package.json +10 -7
  76. package/CHANGELOG.md +0 -151
  77. package/dist/VitestKyselyTransactionIsolator-0CqOsuc9.cjs.map +0 -1
  78. package/dist/VitestKyselyTransactionIsolator-CduJlHoT.d.cts.map +0 -1
  79. package/dist/VitestKyselyTransactionIsolator-CfSMOFlN.mjs.map +0 -1
  80. package/dist/VitestKyselyTransactionIsolator-Cswnnj0k.d.mts.map +0 -1
  81. package/dist/VitestTransactionIsolator-BNWJqh9f.d.mts.map +0 -1
  82. package/dist/VitestTransactionIsolator-CSroc7Df.d.cts.map +0 -1
  83. package/dist/VitestTransactionIsolator-CtZaOUjH.cjs.map +0 -1
  84. package/dist/VitestTransactionIsolator-D6ZxLWys.mjs.map +0 -1
  85. package/src/Factory.ts +0 -174
  86. package/src/KyselyFactory.ts +0 -391
  87. package/src/ObjectionFactory.ts +0 -412
  88. package/src/PostgresKyselyMigrator.ts +0 -104
  89. package/src/PostgresMigrator.ts +0 -193
  90. package/src/PostgresObjectionMigrator.ts +0 -138
  91. package/src/VitestKyselyTransactionIsolator.ts +0 -72
  92. package/src/VitestObjectionTransactionIsolator.ts +0 -75
  93. package/src/VitestTransactionIsolator.ts +0 -348
  94. package/src/__tests__/Factory.spec.ts +0 -178
  95. package/src/__tests__/KyselyFactory.spec.ts +0 -458
  96. package/src/__tests__/ObjectionFactory.spec.ts +0 -586
  97. package/src/__tests__/PostgresKyselyMigrator.spec.ts +0 -794
  98. package/src/__tests__/PostgresMigrator.spec.ts +0 -471
  99. package/src/__tests__/PostgresObjectionMigrator.spec.ts +0 -634
  100. package/src/__tests__/VitestObjectionTransactionIsolator.spec.ts +0 -138
  101. package/src/__tests__/benchmark.spec.ts +0 -140
  102. package/src/__tests__/better-auth.spec.ts +0 -21
  103. package/src/__tests__/faker.spec.ts +0 -231
  104. package/src/__tests__/initScript.spec.ts +0 -332
  105. package/src/__tests__/integration.spec.ts +0 -610
  106. package/src/__tests__/requestContext.spec.ts +0 -113
  107. package/src/__tests__/utilities.spec.ts +0 -211
  108. package/src/aws.ts +0 -131
  109. package/src/benchmark.ts +0 -48
  110. package/src/better-auth.ts +0 -310
  111. package/src/faker.ts +0 -349
  112. package/src/helpers.ts +0 -45
  113. package/src/initScript.ts +0 -122
  114. package/src/kysely.ts +0 -166
  115. package/src/logger.ts +0 -18
  116. package/src/objection.ts +0 -157
  117. package/src/os/directory.ts +0 -26
  118. package/src/os/index.ts +0 -1
  119. package/src/requestContext.ts +0 -119
  120. package/src/timer.ts +0 -3
  121. package/test/globalSetup.ts +0 -54
  122. package/test/helpers.ts +0 -268
  123. package/test/migrations/1749664623372_user.ts +0 -22
  124. package/tsconfig.json +0 -9
  125. package/vitest.config.ts +0 -8
@@ -1,391 +0,0 @@
1
- import type {
2
- ControlledTransaction,
3
- Insertable,
4
- Kysely,
5
- Selectable,
6
- } from 'kysely';
7
- import { type ExtractSeedAttrs, Factory, type FactorySeed } from './Factory';
8
- import { type FakerFactory, faker } from './faker';
9
-
10
- /**
11
- * Factory implementation for Kysely ORM, providing test data creation utilities.
12
- * Extends the base Factory class with Kysely-specific database operations.
13
- *
14
- * @template DB - The database schema type
15
- * @template Builders - Record of builder functions for creating entities
16
- * @template Seeds - Record of seed functions for complex test scenarios
17
- *
18
- * @example
19
- * ```typescript
20
- * // Define your database schema
21
- * interface Database {
22
- * users: UsersTable;
23
- * posts: PostsTable;
24
- * }
25
- *
26
- * // Create builders
27
- * const builders = {
28
- * user: KyselyFactory.createBuilder<Database, 'users'>('users', ({ attrs, faker }) => ({
29
- * id: faker.string.uuid(),
30
- * name: faker.person.fullName(),
31
- * email: faker.internet.email(),
32
- * ...attrs
33
- * })),
34
- * post: KyselyFactory.createBuilder<Database, 'posts'>('posts', ({ attrs }) => ({
35
- * title: 'Test Post',
36
- * content: 'Test content',
37
- * ...attrs
38
- * }))
39
- * };
40
- *
41
- * // Create factory instance
42
- * const factory = new KyselyFactory(builders, seeds, db);
43
- *
44
- * // Use in tests
45
- * const user = await factory.insert('user', { name: 'John Doe' });
46
- * ```
47
- */
48
- export class KyselyFactory<
49
- DB,
50
- Builders extends Record<string, any>,
51
- Seeds extends Record<string, any>,
52
- > extends Factory<Builders, Seeds> {
53
- /**
54
- * Creates a typed seed function with proper type inference.
55
- * Inherits from the base Factory class implementation.
56
- *
57
- * @template Seed - The seed function type
58
- * @param seedFn - The seed function to wrap (receives { attrs, factory, db } object)
59
- * @returns The same seed function with proper typing
60
- *
61
- * @example
62
- * ```typescript
63
- * const seeds = {
64
- * userWithPosts: KyselyFactory.createSeed(
65
- * async ({ attrs, factory }) => {
66
- * const user = await factory.insert('user', attrs);
67
- * await factory.insertMany(3, 'post', { userId: user.id });
68
- * return user;
69
- * },
70
- * ),
71
- * };
72
- * ```
73
- */
74
- static override createSeed<Seed extends FactorySeed>(seedFn: Seed): Seed {
75
- return Factory.createSeed(seedFn);
76
- }
77
-
78
- /**
79
- * Creates a new KyselyFactory instance.
80
- *
81
- * @param builders - Record of builder functions for creating individual entities
82
- * @param seeds - Record of seed functions for creating complex test scenarios
83
- * @param db - Kysely database instance or controlled transaction
84
- */
85
- constructor(
86
- private builders: Builders,
87
- private seeds: Seeds,
88
- private db: Kysely<DB> | ControlledTransaction<DB, []>,
89
- ) {
90
- super();
91
- }
92
-
93
- /**
94
- * Creates a typed builder function for a specific database table.
95
- * This is a utility method that helps create builders with proper type inference for Kysely.
96
- *
97
- * @template DB - The database schema type
98
- * @template TableName - The name of the table (must be a key of DB)
99
- * @template Attrs - The attributes type for the builder (defaults to Partial<Insertable>)
100
- * @template Factory - The factory instance type
101
- * @template Result - The result type (defaults to Selectable of the table)
102
- *
103
- * @param table - The name of the database table
104
- * @param defaults - Optional function to provide default values (receives destructured context)
105
- * @param autoInsert - Whether to automatically insert the record (default: true)
106
- * @returns A builder function that creates and optionally inserts records
107
- *
108
- * @example
109
- * ```typescript
110
- * // Create a simple builder with defaults - destructure only what you need
111
- * const userBuilder = KyselyFactory.createBuilder<DB, 'users'>('users',
112
- * ({ attrs, faker }) => ({
113
- * id: faker.string.uuid(),
114
- * name: faker.person.fullName(),
115
- * email: faker.internet.email(),
116
- * createdAt: new Date(),
117
- * ...attrs
118
- * })
119
- * );
120
- *
121
- * // Only need faker? Just destructure that
122
- * const leaveTypeBuilder = KyselyFactory.createBuilder<DB, 'leaveTypes'>('leaveTypes',
123
- * ({ faker }) => ({
124
- * name: faker.helpers.arrayElement(['Annual', 'Sick', 'Maternity']),
125
- * code: faker.string.alpha({ length: 3, casing: 'upper' }),
126
- * })
127
- * );
128
- *
129
- * // Create a builder that doesn't auto-insert (useful for nested inserts)
130
- * const addressBuilder = KyselyFactory.createBuilder<DB, 'addresses'>('addresses',
131
- * ({ attrs }) => ({
132
- * street: '123 Main St',
133
- * city: 'Anytown',
134
- * ...attrs
135
- * }),
136
- * false // Don't auto-insert
137
- * );
138
- * ```
139
- */
140
- static createBuilder<
141
- DB,
142
- TableName extends keyof DB & string,
143
- Attrs extends Partial<Insertable<DB[TableName]>> = Partial<
144
- Insertable<DB[TableName]>
145
- >,
146
- Factory = any,
147
- Result = Selectable<DB[TableName]>,
148
- >(
149
- table: TableName,
150
- defaults?: (context: {
151
- attrs: Attrs;
152
- factory: Factory;
153
- db: Kysely<DB>;
154
- faker: FakerFactory;
155
- }) =>
156
- | Partial<Insertable<DB[TableName]>>
157
- | Promise<Partial<Insertable<DB[TableName]>>>,
158
- autoInsert?: boolean,
159
- ): (
160
- attrs: Attrs,
161
- factory: Factory,
162
- db: Kysely<DB>,
163
- faker: FakerFactory,
164
- ) => Promise<Result> {
165
- return async (
166
- attrs: Attrs,
167
- factory: Factory,
168
- db: Kysely<DB>,
169
- fakerInstance: FakerFactory,
170
- ) => {
171
- // Start with attributes
172
- let data: Partial<Insertable<DB[TableName]>> = { ...attrs };
173
-
174
- // Apply defaults
175
- if (defaults) {
176
- const defaultValues = await defaults({
177
- attrs,
178
- factory,
179
- db,
180
- faker: fakerInstance,
181
- });
182
- data = { ...defaultValues, ...data };
183
- }
184
-
185
- // Handle insertion based on autoInsert flag
186
- if (autoInsert !== false) {
187
- // Auto insert is enabled by default
188
- const result = await db
189
- .insertInto(table)
190
- .values(data as Insertable<DB[TableName]>)
191
- .returningAll()
192
- .executeTakeFirst();
193
-
194
- if (!result) {
195
- throw new Error(`Failed to insert into ${table}`);
196
- }
197
-
198
- return result as Result;
199
- } else {
200
- // Return object for factory to handle insertion
201
- return { table, data } as any;
202
- }
203
- };
204
- }
205
-
206
- /**
207
- * Inserts a single record into the database using the specified builder.
208
- * The builder function is responsible for generating the record data with defaults
209
- * and the factory handles the actual database insertion.
210
- *
211
- * @template K - The builder name (must be a key of Builders)
212
- * @param builderName - The name of the builder to use
213
- * @param attrs - Optional attributes to override builder defaults
214
- * @returns A promise resolving to the inserted record
215
- * @throws Error if the specified builder doesn't exist
216
- *
217
- * @example
218
- * ```typescript
219
- * // Insert with defaults
220
- * const user = await factory.insert('user');
221
- *
222
- * // Insert with overrides
223
- * const adminUser = await factory.insert('user', {
224
- * email: 'admin@example.com',
225
- * role: 'admin'
226
- * });
227
- *
228
- * // Use the inserted record
229
- * const post = await factory.insert('post', {
230
- * userId: user.id,
231
- * title: 'My First Post'
232
- * });
233
- * ```
234
- */
235
- async insert<K extends keyof Builders>(
236
- builderName: K,
237
- attrs?: Parameters<Builders[K]>[0],
238
- ): Promise<Awaited<ReturnType<Builders[K]>>> {
239
- if (!(builderName in this.builders)) {
240
- throw new Error(
241
- `Factory "${
242
- builderName as string
243
- }" does not exist. Make sure it is correct and registered in src/test/setup.ts`,
244
- );
245
- }
246
-
247
- const result = await this.builders[builderName](
248
- attrs || {},
249
- this,
250
- this.db,
251
- faker,
252
- );
253
-
254
- // For Kysely, we expect the builder to return an object with table and data properties
255
- // or to handle the insertion itself and return the inserted record
256
- if (
257
- result &&
258
- typeof result === 'object' &&
259
- 'table' in result &&
260
- 'data' in result
261
- ) {
262
- // If the builder returns {table: string, data: object}, we insert it
263
- const inserted = await this.db
264
- .insertInto(result.table)
265
- .values(result.data)
266
- .returningAll()
267
- .executeTakeFirst();
268
-
269
- return inserted as any;
270
- }
271
-
272
- // Otherwise, assume the builder handled the insertion itself
273
- return result;
274
- }
275
-
276
- /**
277
- * Inserts multiple records into the database using the specified builder.
278
- * Supports both static attributes and dynamic attribute generation via a function.
279
- *
280
- * @template K - The builder name (must be a key of Builders)
281
- * @param count - The number of records to insert
282
- * @param builderName - The name of the builder to use
283
- * @param attrs - Static attributes or a function that generates attributes for each record
284
- * @returns A promise resolving to an array of inserted records
285
- * @throws Error if the specified builder doesn't exist
286
- *
287
- * @example
288
- * ```typescript
289
- * // Insert multiple with same attributes
290
- * const users = await factory.insertMany(5, 'user', { role: 'member' });
291
- *
292
- * // Insert multiple with dynamic attributes
293
- * const posts = await factory.insertMany(10, 'post', (idx, faker) => ({
294
- * title: `Post ${idx + 1}`,
295
- * content: faker.lorem.paragraph(),
296
- * publishedAt: faker.date.past()
297
- * }));
298
- *
299
- * // Create users with sequential emails
300
- * const admins = await factory.insertMany(3, 'user', (idx) => ({
301
- * email: `admin${idx + 1}@example.com`,
302
- * role: 'admin'
303
- * }));
304
- * ```
305
- */
306
- // Method overloads for better type inference
307
- async insertMany<K extends keyof Builders>(
308
- count: number,
309
- builderName: K,
310
- attrs?: Parameters<Builders[K]>[0],
311
- ): Promise<Awaited<ReturnType<Builders[K]>>[]>;
312
- async insertMany<K extends keyof Builders>(
313
- count: number,
314
- builderName: K,
315
- attrs: (
316
- idx: number,
317
- faker: FakerFactory,
318
- ) => Parameters<Builders[K]>[0] | Promise<Parameters<Builders[K]>[0]>,
319
- ): Promise<Awaited<ReturnType<Builders[K]>>[]>;
320
- async insertMany<K extends keyof Builders>(
321
- count: number,
322
- builderName: K,
323
- attrs?: any,
324
- ): Promise<Awaited<ReturnType<Builders[K]>>[]> {
325
- if (!(builderName in this.builders)) {
326
- throw new Error(
327
- `Builder "${
328
- builderName as string
329
- }" is not registered in this factory. Make sure it is correct and registered in src/test/setup.ts`,
330
- );
331
- }
332
-
333
- const promises: Promise<any>[] = [];
334
-
335
- for (let i = 0; i < count; i++) {
336
- const newAttrs =
337
- typeof attrs === 'function' ? await attrs(i, faker) : attrs;
338
- promises.push(this.insert(builderName, newAttrs));
339
- }
340
-
341
- return Promise.all(promises);
342
- }
343
-
344
- /**
345
- * Executes a seed function to create complex test scenarios with multiple related records.
346
- * Seeds are useful for setting up complete test environments with realistic data relationships.
347
- *
348
- * @template K - The seed name (must be a key of Seeds)
349
- * @param seedName - The name of the seed to execute
350
- * @param attrs - Optional configuration attributes for the seed
351
- * @returns The result of the seed function (typically the primary record created)
352
- * @throws Error if the specified seed doesn't exist
353
- *
354
- * @example
355
- * ```typescript
356
- * // Execute a simple seed
357
- * const user = await factory.seed('userWithProfile');
358
- *
359
- * // Execute a seed with configuration
360
- * const author = await factory.seed('authorWithBooks', {
361
- * bookCount: 5,
362
- * includeReviews: true
363
- * });
364
- *
365
- * // Use seed result in tests
366
- * const company = await factory.seed('companyWithDepartments', {
367
- * departmentCount: 3,
368
- * employeesPerDepartment: 10
369
- * });
370
- * expect(company.departments).toHaveLength(3);
371
- * ```
372
- */
373
- seed<K extends keyof Seeds>(
374
- seedName: K,
375
- attrs?: ExtractSeedAttrs<Seeds[K]>,
376
- ): ReturnType<Seeds[K]> {
377
- if (!(seedName in this.seeds)) {
378
- throw new Error(
379
- `Seed "${
380
- seedName as string
381
- }" is not registered in this factory. Make sure it is correct and registered in src/test/setup.ts`,
382
- );
383
- }
384
-
385
- return this.seeds[seedName]({
386
- attrs: attrs || {},
387
- factory: this,
388
- db: this.db,
389
- });
390
- }
391
- }