Files
payload/test/hooks/config.ts
Dan Ribbens 09f57e9a4c test: group relationships
* test: relationship fields inside groups and subgroup

* test: group nested relationships and arrays

* test: improves coverage for hooks

Co-authored-by: James <james@trbl.design>
2022-07-20 11:52:21 -07:00

32 lines
876 B
TypeScript

import { buildConfig } from '../buildConfig';
import TransformHooks from './collections/Transform';
import Hooks, { hooksSlug } from './collections/Hook';
import NestedAfterReadHooks from './collections/NestedAfterReadHooks';
import Relations from './collections/Relations';
export default buildConfig({
collections: [
TransformHooks,
Hooks,
NestedAfterReadHooks,
Relations,
],
onInit: async (payload) => {
await payload.create({
collection: hooksSlug,
data: {
check: 'update',
fieldBeforeValidate: false,
collectionBeforeValidate: false,
fieldBeforeChange: false,
collectionBeforeChange: false,
fieldAfterChange: false,
collectionAfterChange: false,
collectionBeforeRead: false,
fieldAfterRead: false,
collectionAfterRead: false,
},
});
},
});