We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4527138 commit a7f1f85Copy full SHA for a7f1f85
test/utils/operators.test.js
@@ -0,0 +1,24 @@
1
+const sequelize = require('sequelize');
2
+const Operators = require('../../src/utils/operators');
3
+
4
+describe('utils > operators', () => {
5
+ describe('with an old sequelize', () => {
6
+ it('should return a valid operator', () => {
7
+ expect.assertions(2);
8
9
+ const Op = new Operators();
10
+ expect(Op.AND).toStrictEqual('$and');
11
+ expect(Op.CONTAINS).toStrictEqual('$contains');
12
+ });
13
14
15
+ describe('with an up to date sequelize', () => {
16
17
18
19
+ const Op = new Operators({ sequelize });
20
+ expect(Op.AND).toStrictEqual(sequelize.Op.AND);
21
+ expect(Op.CONTAINS).toStrictEqual(sequelize.Op.CONTAINS);
22
23
24
+});
0 commit comments