Tests refactor
This commit is contained in:
parent
245520fb50
commit
99134d8556
165 changed files with 911 additions and 531 deletions
|
|
@ -1,23 +0,0 @@
|
|||
import { describe, it, expect } from 'vitest';
|
||||
import { MedicineProductModel } from './medicine-product.schema.js';
|
||||
|
||||
describe(MedicineProductModel.name, () => {
|
||||
it('is a valid mongoose model', () => {
|
||||
expect(MedicineProductModel.modelName).toBe('MedicineProduct');
|
||||
});
|
||||
|
||||
it('has expected schema paths', () => {
|
||||
const paths = Object.keys(MedicineProductModel.schema.paths);
|
||||
expect(paths).toContain('householdId');
|
||||
expect(paths).toContain('medicineId');
|
||||
expect(paths).toContain('medicineName');
|
||||
expect(paths).toContain('brand');
|
||||
expect(paths).toContain('packageSize');
|
||||
expect(paths).toContain('packageUnit');
|
||||
expect(paths).toContain('source');
|
||||
expect(paths).toContain('createdBy');
|
||||
expect(paths).toContain('isDeleted');
|
||||
expect(paths).toContain('createdAt');
|
||||
expect(paths).toContain('updatedAt');
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue