chore: added global lint and test commands to backend package (#81)
* chore: added global lint and test commands to backend package * chore: removed lint command from root scope execution
This commit is contained in:
@@ -20,7 +20,8 @@
|
||||
"test:watch": "jest --watch",
|
||||
"test:cov": "jest --coverage",
|
||||
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
||||
"test:e2e": "jest --config ./test/jest-e2e.json"
|
||||
"test:e2e": "jest --config ./test/jest-e2e.json",
|
||||
"do-test": "pnpm run test"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs-modules/mailer": "^1.8.1",
|
||||
|
||||
@@ -8,8 +8,8 @@ import { MailerModule } from '../mailer/mailer.module';
|
||||
import { TeamModule } from '../team/team.module';
|
||||
import { TeamInvitationModule } from '../team-invitation/team-invitation.module';
|
||||
import { TeamEnvironmentsModule } from '../team-environments/team-environments.module';
|
||||
import {TeamCollectionModule} from "../team-collection/team-collection.module";
|
||||
import {TeamRequestModule} from "../team-request/team-request.module";
|
||||
import { TeamCollectionModule } from '../team-collection/team-collection.module';
|
||||
import { TeamRequestModule } from '../team-request/team-request.module';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
|
||||
@@ -16,4 +16,4 @@ export class PrismaService
|
||||
async onModuleDestroy() {
|
||||
await this.$disconnect();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,7 @@ import * as O from 'fp-ts/Option';
|
||||
import * as TO from 'fp-ts/TaskOption';
|
||||
import * as E from 'fp-ts/Either';
|
||||
import { PrismaService } from 'src/prisma/prisma.service';
|
||||
import {
|
||||
SHORTCODE_INVALID_JSON,
|
||||
SHORTCODE_NOT_FOUND,
|
||||
} from 'src/errors';
|
||||
import { SHORTCODE_INVALID_JSON, SHORTCODE_NOT_FOUND } from 'src/errors';
|
||||
import { UserDataHandler } from 'src/user/user.data.handler';
|
||||
import { Shortcode } from './shortcode.model';
|
||||
import { Shortcode as DBShortCode } from '@prisma/client';
|
||||
|
||||
@@ -64,7 +64,7 @@ export class TeamInvitationResolver {
|
||||
description: 'Get the creator of the invite',
|
||||
})
|
||||
async creator(@Parent() teamInvitation: TeamInvitation): Promise<User> {
|
||||
let user = await this.userService.findUserById(teamInvitation.creatorUid);
|
||||
const user = await this.userService.findUserById(teamInvitation.creatorUid);
|
||||
if (O.isNone(user)) throwErr(USER_NOT_FOUND);
|
||||
|
||||
return {
|
||||
|
||||
@@ -240,7 +240,9 @@ describe('deleteTeamRequest', () => {
|
||||
|
||||
describe('createTeamRequest', () => {
|
||||
test('rejects for invalid collection id', async () => {
|
||||
mockTeamCollectionService.getTeamOfCollection.mockResolvedValue(E.left(TEAM_INVALID_COLL_ID));
|
||||
mockTeamCollectionService.getTeamOfCollection.mockResolvedValue(
|
||||
E.left(TEAM_INVALID_COLL_ID),
|
||||
);
|
||||
|
||||
const response = await teamRequestService.createTeamRequest(
|
||||
'invalidcollid',
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
import {
|
||||
ObjectType,
|
||||
ID,
|
||||
Field,
|
||||
registerEnumType,
|
||||
} from '@nestjs/graphql';
|
||||
import { ObjectType, ID, Field, registerEnumType } from '@nestjs/graphql';
|
||||
|
||||
@ObjectType()
|
||||
export class User {
|
||||
|
||||
Reference in New Issue
Block a user