Preprocessing bugfix

This commit is contained in:
Bán Dénes 2023-01-30 14:57:24 +01:00
parent c45523f38a
commit 480c362c1e
3 changed files with 24 additions and 1 deletions

View file

@ -24,6 +24,7 @@ describe('Prepare', function() {
})
it('inherit', function() {
// normal case
p.inherit({
a: {
x: 1,
@ -43,6 +44,23 @@ describe('Prepare', function() {
z: 3,
w: 4
})
// should apply to objects within arrays as well!
p.inherit({
a: {
x: 1,
y: 2
},
b: [
{
$extends: 'a',
z: 3
}
]
}).b[0].should.deep.equal({
x: 1,
y: 2,
z: 3
})
})
it('parameterize', function() {