@@ -1254,7 +1254,8 @@ describe('Feathers Objection Service', () => {
12541254 numberField : 1.5 ,
12551255 objectField : {
12561256 object : 'string in jsonObject.objectField.object'
1257- }
1257+ } ,
1258+ 'first.founder' : 'John'
12581259 } ,
12591260 jsonArray : [
12601261 {
@@ -1267,6 +1268,10 @@ describe('Feathers Objection Service', () => {
12671268 ] ) ;
12681269 } ) ;
12691270
1271+ after ( async ( ) => {
1272+ await companies . remove ( null ) ;
1273+ } ) ;
1274+
12701275 it ( 'object' , ( ) => {
12711276 return companies . find ( { query : { jsonObject : { $ne : null } } } ) . then ( data => {
12721277 expect ( data [ 0 ] . jsonObject . stringField ) . to . equal ( 'string' ) ;
@@ -1320,6 +1325,18 @@ describe('Feathers Objection Service', () => {
13201325 expect ( data [ 0 ] . jsonArray [ 0 ] . objectField . object ) . to . equal ( 'I\'m string in jsonArray[0].objectField.object' ) ;
13211326 } ) ;
13221327 } ) ;
1328+
1329+ it ( 'dot in property name' , ( ) => {
1330+ return companies . find ( { query : { jsonObject : { '(first.founder)' : 'John' } } } ) . then ( data => {
1331+ expect ( data [ 0 ] . jsonObject [ 'first.founder' ] ) . to . equal ( 'John' ) ;
1332+ } ) ;
1333+ } ) ;
1334+
1335+ it ( 'dot in property name with brackets' , ( ) => {
1336+ return companies . find ( { query : { jsonObject : { '[first.founder]' : 'John' } } } ) . then ( data => {
1337+ expect ( data [ 0 ] . jsonObject [ 'first.founder' ] ) . to . equal ( 'John' ) ;
1338+ } ) ;
1339+ } ) ;
13231340 } ) ;
13241341
13251342 describe . skip ( 'JSON operators (Postgres)' , ( ) => {
@@ -1464,6 +1481,12 @@ describe('Feathers Objection Service', () => {
14641481 ] ) ;
14651482 } ) ;
14661483
1484+ afterEach ( async ( ) => {
1485+ try {
1486+ await companies . remove ( null ) ;
1487+ } catch ( err ) { }
1488+ } ) ;
1489+
14671490 it ( 'create with $noSelect' , ( ) => {
14681491 return companies . create ( {
14691492 name : 'Apple' ,
0 commit comments