Skip to content

Commit 51ae2f4

Browse files
committed
add tests
1 parent 0021612 commit 51ae2f4

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/compass-data-modeling/src/utils/nodes-and-edges.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
render,
77
userEvent,
88
} from '@mongodb-js/testing-library-compass';
9-
import { getFieldsFromSchema } from '../utils/nodes-and-edges';
9+
import { getFieldsFromSchema } from './nodes-and-edges';
1010

1111
describe('getFieldsFromSchema', function () {
1212
const validateMixedType = async (

packages/compass-data-modeling/src/utils/schema-traversal.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export const traverseSchema = ({
2121
}: {
2222
fieldPath: FieldPath;
2323
fieldTypes: string[];
24+
fieldSchema: MongoDBJSONSchema;
2425
}) => void;
2526
parentFieldPath?: FieldPath;
2627
}): void => {
@@ -61,6 +62,7 @@ export const traverseSchema = ({
6162
visitor({
6263
fieldPath: newFieldPath,
6364
fieldTypes: types.flat(),
65+
fieldSchema: field,
6466
});
6567

6668
children.flat().forEach((child) =>

0 commit comments

Comments
 (0)