mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-06-02 22:26:57 -05:00
* Stop using npm run migrate:reset in tests * Begin moving other existing fixtures to factories * Update cypress/support/index.ts Co-authored-by: Kalle <38327916+Sendouc@users.noreply.github.com> * Clean up usage of _.sample * Rename files * Remove incomplete building of associations * Add missing references to calendarEvent * Remove inaccurate seeds * Add explicit lodash devDependency Co-authored-by: Kalle <38327916+Sendouc@users.noreply.github.com>
19 lines
572 B
TypeScript
19 lines
572 B
TypeScript
import { Factory } from "fishery";
|
|
import { PlusSuggestion } from "@prisma/client";
|
|
import prisma from "../client";
|
|
|
|
export default Factory.define<PlusSuggestion>(({ params, onCreate }) => {
|
|
onCreate(plusSuggestion => {
|
|
return prisma.plusSuggestion.create({ data: plusSuggestion });
|
|
});
|
|
|
|
return {
|
|
suggestedId: 1, // TODO: automatically build a User object, if necessary
|
|
suggesterId: 2, // TODO: automatically build a User object, if necessary
|
|
tier: 1,
|
|
description: "yooo so cracked",
|
|
isResuggestion: false,
|
|
createdAt: new Date()
|
|
};
|
|
});
|