-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/bai 796 get api v2 schemas #664
Conversation
id: 'example-schema-2', | ||
name: 'Example Schema 2', | ||
description: '', | ||
const schemas: Array<SchemaInterface> = await findSchemasByKind(query.kind) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary typing. If TypeScript can't work it out for itself, you should add a return type to findSchemasByKind
instead of putting it here.
@@ -0,0 +1,45 @@ | |||
import { SchemaKind } from '../../src/models/v2/Schema.js' | |||
|
|||
export const testModelSchema = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file should probably be 'testSchemas' instead of 'testModels'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's a misunderstanding of the meaning of 'models' in this context. I'm intending this file to be the V2 version of https://github.com/gchq/Bailo/blob/main/backend/src/utils/test/testModels.ts
backend/test/services/schema.spec.ts
Outdated
} | ||
}) | ||
vi.mock('../../src/models/v2/Schema.js', () => ({ | ||
SchemaKind: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should import this (via e.g. importActual), instead of mocking it. Alternatively, we could put it in a separate types
folder.
No description provided.