Skip to content

Commit

Permalink
feat: fix failed test
Browse files Browse the repository at this point in the history
  • Loading branch information
dangchinh25 committed Nov 6, 2023
1 parent d92de67 commit bd50da7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/helpers/parser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) );
Expand Down

0 comments on commit bd50da7

Please sign in to comment.