From bd50da7386bea2219828ad74f8904fa257a77f9c Mon Sep 17 00:00:00 2001 From: dangchinh25 Date: Mon, 6 Nov 2023 10:34:33 -0600 Subject: [PATCH] feat: fix failed test --- tests/helpers/parser.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/helpers/parser.test.ts b/tests/helpers/parser.test.ts index 738e673..8a1aa1c 100644 --- a/tests/helpers/parser.test.ts +++ b/tests/helpers/parser.test.ts @@ -29,7 +29,12 @@ describe( 'parseDMMFModels', () => { const modelDbName = model.dbName || model.name; const parsedModel = parsedModels[ modelDbName ]; - const modelAttributes = model.fields.map( field => field.dbName || field.name ); + const modelAttributes = model.fields.map( field => { + return { + name: field.dbName || field.name, + type: field.type + }; + } ); expect( parsedModel.attributes ) .toStrictEqual( expect.arrayContaining( modelAttributes ) );