Skip to content

Commit b4cd384

Browse files
committed
Revert JSON test changes
1 parent 579ffb5 commit b4cd384

File tree

1 file changed

+0
-85
lines changed

1 file changed

+0
-85
lines changed

test/index.test.ts

Lines changed: 0 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,6 @@ const Model = sequelize.define('people', {
109109
status: {
110110
type: Sequelize.STRING,
111111
defaultValue: 'pending'
112-
},
113-
profile: {
114-
type: Sequelize.JSONB
115112
}
116113
}, {
117114
freezeTableName: true,
@@ -999,47 +996,6 @@ describe('Feathers Sequelize Service', () => {
999996
});
1000997
expect(responseMulti).to.deep.equal([]);
1001998
});
1002-
1003-
it('can query by JSON fields', async () => {
1004-
await app.service('people').create({
1005-
name: 'Dave',
1006-
profile: { type: 'find' }
1007-
});
1008-
1009-
const found = await app.service('people').find({
1010-
query: {
1011-
'profile.type': 'find'
1012-
}
1013-
}) as any;
1014-
1015-
assert.strictEqual(found.length, 1);
1016-
assert.deepStrictEqual(found[0].profile, { type: 'find' });
1017-
});
1018-
1019-
it('Can update nested JSON fields', async () => {
1020-
const created = await app.service('people').create({
1021-
name: 'Dave',
1022-
profile: {
1023-
location: {
1024-
city: 'Memphis',
1025-
state: 'Tennessee'
1026-
}
1027-
}
1028-
});
1029-
1030-
const patched = await app.service('people').patch(created.id, {
1031-
name: 'David',
1032-
'profile.location.city': 'Nashville'
1033-
}) as any;
1034-
1035-
assert.strictEqual(patched.name, 'David');
1036-
assert.deepStrictEqual(patched.profile, {
1037-
location: {
1038-
city: 'Nashville',
1039-
state: 'Tennessee'
1040-
}
1041-
});
1042-
});
1043999
});
10441000

10451001
describe('raw Service', () => {
@@ -1183,47 +1139,6 @@ describe('Feathers Sequelize Service', () => {
11831139
expect(results).to.be.an('array').with.lengthOf(1);
11841140
expect(results[0]).to.be.an.instanceof(Model);
11851141
});
1186-
1187-
it('can query by JSON fields', async () => {
1188-
await app.service('people').create({
1189-
name: 'Dave',
1190-
profile: { type: 'find' }
1191-
});
1192-
1193-
const found = await app.service('people').find({
1194-
query: {
1195-
'profile.type': 'find'
1196-
}
1197-
}) as any;
1198-
1199-
assert.strictEqual(found.length, 1);
1200-
assert.deepStrictEqual(found[0].profile, { type: 'find' });
1201-
});
1202-
1203-
it('Can update nested JSON fields', async () => {
1204-
const created = await app.service('people').create({
1205-
name: 'Dave',
1206-
profile: {
1207-
location: {
1208-
city: 'Memphis',
1209-
state: 'Tennessee'
1210-
}
1211-
}
1212-
});
1213-
1214-
const patched = await app.service('people').patch(created.id, {
1215-
name: 'David',
1216-
'profile.location.city': 'Nashville'
1217-
}) as any;
1218-
1219-
assert.strictEqual(patched.name, 'David');
1220-
assert.deepStrictEqual(patched.profile, {
1221-
location: {
1222-
city: 'Nashville',
1223-
state: 'Tennessee'
1224-
}
1225-
});
1226-
});
12271142
});
12281143
});
12291144

0 commit comments

Comments
 (0)