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>
21 lines
549 B
TypeScript
21 lines
549 B
TypeScript
import { Factory } from "fishery";
|
|
import { PlusVotingSummary } from "@prisma/client";
|
|
import prisma from "../client";
|
|
|
|
export default Factory.define<PlusVotingSummary>(({ params, onCreate }) => {
|
|
onCreate(plusVotingSummary => {
|
|
return prisma.plusVotingSummary.create({ data: plusVotingSummary });
|
|
});
|
|
|
|
return {
|
|
userId: 1, // TODO: automatically build a User object, if necessary
|
|
month: 1,
|
|
tier: 1,
|
|
year: 2020,
|
|
wasVouched: false,
|
|
wasSuggested: false,
|
|
countsEU: [0, 0, 0, 3],
|
|
countsNA: [0, 0, 2, 0]
|
|
};
|
|
});
|