test: Add types to getUser test file

This commit is contained in:
Faruk AYDIN
2023-10-04 20:42:47 +02:00
parent b5df1a026a
commit 1683c5630a
5 changed files with 22 additions and 14 deletions

View File

@@ -1,9 +1,11 @@
import { IRole } from '@automatisch/types';
type RoleParams = {
name?: string;
key?: string;
};
const createRole = async (params: RoleParams = {}) => {
const createRole = async (params: RoleParams = {}): Promise<IRole> => {
params.name = params?.name || 'Viewer';
params.key = params?.key || 'viewer';