diff --git a/src/sscce-sequelize-6.ts b/src/sscce-sequelize-6.ts index c90761b96..405ecc0f1 100644 --- a/src/sscce-sequelize-6.ts +++ b/src/sscce-sequelize-6.ts @@ -1,4 +1,4 @@ -import { DataTypes, Model } from 'sequelize'; +import { DataTypes, Model, Op } from 'sequelize'; import { createSequelize6Instance } from '../setup/create-sequelize-instance'; import { expect } from 'chai'; import sinon from 'sinon'; @@ -36,6 +36,10 @@ export async function run() { await sequelize.sync({ force: true }); expect(spy).to.have.been.called; - console.log(await Foo.create({ name: 'TS foo' })); - expect(await Foo.count()).to.equal(1); + console.log(await Foo.create({ name: 'TS foo'})); + console.log(await Foo.create({ name: 'd-test'})); + expect(await Foo.count()).to.equal(2); + + console.log(await Foo.count({where: {name: { [Op.iLike]: `%d%`} }})); + expect(await Foo.count({where: {name: { [Op.iLike]: `%d%`} }})).to.equal(1); }