Skip to content

Commit

Permalink
resolve github actions failure
Browse files Browse the repository at this point in the history
  • Loading branch information
pinocchio-life-like committed Dec 29, 2024
1 parent 117e3f4 commit a54f429
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 18 deletions.
2 changes: 1 addition & 1 deletion server/src/services/packTemplate/addPackTemplateService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const addPackTemplateService = async (
type: '',
itemPackTemplates: [],
itemsOwnerId: '',
} as validator.AddPackTemplateType,
} as const,
executionCtx: ExecutionContext,
): Promise<PackTemplate> => {
const { name, description, type } = packTemplateData;
Expand Down
18 changes: 8 additions & 10 deletions server/src/swaggerOptions.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// @ts-nocheck

import TripSchema from './models/tripModel';
import PackSchema from './models/packModel';
import ItemSchema from './models/itemModel';
import UserSchema from './models/userModel';
import { trip } from './db/schema';
import { pack } from './db/schema';
import { item } from './db/schema';
import { user } from './db/schema';

import m2s from 'mongoose-to-swagger';
import swaggerJsdoc from 'swagger-jsdoc';
Expand Down Expand Up @@ -49,10 +47,10 @@ const specs: any = swaggerJsdoc(options);
// Add the schemas generated by mongoose-to-swagger to the components.schemas property of the specs object
specs.components = {
schemas: {
User: m2s(UserSchema),
Trip: m2s(TripSchema),
Pack: m2s(PackSchema),
Item: m2s(ItemSchema),
User: m2s(user),
Trip: m2s(trip),
Pack: m2s(pack),
Item: m2s(item),
},
};

Expand Down
5 changes: 4 additions & 1 deletion server/src/tests/routes/favorite.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ describe('Favorite routes', () => {
let pack: Pack;

beforeAll(async () => {
const executionCtx = {} as ExecutionContext;
const executionCtx: ExecutionContext = {
waitUntil: () => {},
passThroughOnException: () => {},
};
caller = await setupTest(env, executionCtx);
user = (await userClass.create({
email: '[email protected]',
Expand Down
5 changes: 4 additions & 1 deletion server/src/tests/routes/item.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ describe('Item routes', () => {
let owner: User;

beforeAll(async () => {
const executionCtx = {} as ExecutionContext;
const executionCtx: ExecutionContext = {
waitUntil: () => {},
passThroughOnException: () => {},
};
caller = await setupTest(env, executionCtx);
pack = await packClass.create({
name: 'test',
Expand Down
5 changes: 4 additions & 1 deletion server/src/tests/routes/osm.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ describe('OSM routes', () => {
const nodeClass = new NodeClass();

beforeAll(async () => {
const executionCtx = {} as ExecutionContext;
const executionCtx: ExecutionContext = {
waitUntil: () => {},
passThroughOnException: () => {},
};
caller = await setupTest(env, executionCtx);
});

Expand Down
5 changes: 4 additions & 1 deletion server/src/tests/routes/pack.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ describe('Pack routes', () => {
let owner: User;

beforeAll(async () => {
executionCtx = {} as ExecutionContext;
const executionCtx: ExecutionContext = {
waitUntil: () => {},
passThroughOnException: () => {},
};
caller = await setupTest(env, executionCtx);
owner = (await userClass.create({
email: '[email protected]',
Expand Down
5 changes: 4 additions & 1 deletion server/src/tests/routes/packTemplate.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ describe('Pack template routes', () => {
let packTemplateItems: Item[];

beforeAll(async () => {
const executionCtx = {} as ExecutionContext;
const executionCtx: ExecutionContext = {
waitUntil: () => {},
passThroughOnException: () => {},
};
caller = await setupTest(env, executionCtx);

vi.resetModules();
Expand Down
5 changes: 4 additions & 1 deletion server/src/tests/routes/template.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ describe('Template Routes', () => {
let createdTemplate: Template;

beforeAll(async () => {
const executionCtx = {} as ExecutionContext;
const executionCtx: ExecutionContext = {
waitUntil: () => {},
passThroughOnException: () => {},
};
caller = await setupTest(env, executionCtx);
});

Expand Down
5 changes: 4 additions & 1 deletion server/src/tests/routes/trip.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ describe('Trip Routes', () => {
let owner: User;

beforeAll(async () => {
const executionCtx = {} as ExecutionContext;
const executionCtx: ExecutionContext = {
waitUntil: () => {},
passThroughOnException: () => {},
};
caller = await setupTest(env, executionCtx);
owner = (await userClass.create({
email: '[email protected]',
Expand Down

0 comments on commit a54f429

Please sign in to comment.