Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit e0e929c

Browse files
authored
fix(postgres-test): insert record with enums array into schema (sequelize#14161) (sequelize#14560)
Explanation: - User.sync(), which references the schema, was executed before the schema exists - add an `await` before the schema is created to enforce sequencing/synchronocity Subtle style change: - remove word 'even' from test description Addresses only PostgreSQL-portion of issue sequelize#14161
1 parent 840864a commit e0e929c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/integration/dialects/postgres/dao.test.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -464,9 +464,10 @@ if (dialect.startsWith('postgres')) {
464464
expect(user.length).to.equal(1);
465465
});
466466

467-
it('should be able to insert a new record even with an array of enums in a schema', async function () {
467+
it('should be able to insert a new record with an array of enums in a schema', async function () {
468468
const schema = 'special_schema';
469-
this.sequelize.createSchema(schema);
469+
await this.sequelize.createSchema(schema);
470+
470471
const User = this.sequelize.define('UserEnums', {
471472
name: DataTypes.STRING,
472473
type: DataTypes.ENUM('A', 'B', 'C'),

0 commit comments

Comments
 (0)