@@ -265,6 +265,25 @@ describe('JSONImporter', function () {
265265 assert . equal ( core . getAttribute ( node , 'name' ) , 'NewMetaNodeName' ) ;
266266 assert . equal ( core . getPointerPath ( fco , 'testPtr' ) , core . getPath ( node ) ) ;
267267 } ) ;
268+
269+ it ( 'should set base correctly during structural inheritance' , async function ( ) {
270+ const fco = await core . loadByPath ( root , '/1' ) ;
271+ const nodeA = core . createNode ( { base : fco , parent : root } ) ;
272+ core . setAttribute ( nodeA , 'name' , 'A' ) ;
273+
274+ const nodeB = core . createNode ( { base : fco , parent : nodeA } ) ;
275+ core . setAttribute ( nodeB , 'name' , 'B' ) ;
276+
277+ const nodeAp = core . createNode ( { base : nodeA , parent : root } ) ;
278+ core . setAttribute ( nodeAp , 'name' , 'A prime' ) ;
279+
280+ const [ childPath ] = core . getChildrenPaths ( nodeAp ) ;
281+ const nodeBp = await core . loadByPath ( root , childPath ) ;
282+
283+ const schemaAp = await importer . toJSON ( nodeAp ) ;
284+ const [ schemaBp ] = schemaAp . children ;
285+ assert . equal ( schemaBp . pointers . base , core . getPath ( nodeB ) ) ;
286+ } ) ;
268287 } ) ;
269288
270289 describe ( 'pointer meta' , function ( ) {
0 commit comments