mirror of
https://github.com/TECHNOFAB11/ergogen.git
synced 2025-12-12 08:00:06 +01:00
Prevent circular dependencies in $extends
This commit is contained in:
parent
dd6ff93a89
commit
887220abe3
6 changed files with 17 additions and 4 deletions
|
|
@ -1 +1 @@
|
|||
Custom template override. The secret is 42. MakerJS is 0.17.0. Ergogen is 4.0.5.
|
||||
Custom template override. The secret is 42. MakerJS is loaded. Ergogen is loaded.
|
||||
BIN
test/fixtures/bundle.zip
vendored
BIN
test/fixtures/bundle.zip
vendored
Binary file not shown.
|
|
@ -4,6 +4,6 @@ const version = require('package.json').version
|
|||
module.exports = {
|
||||
convert_outline: () => {},
|
||||
body: params => {
|
||||
return `Custom template override. The secret is ${params.custom.secret}. MakerJS is ${m.version}. Ergogen is ${version}.`
|
||||
return `Custom template override. The secret is ${params.custom.secret}. MakerJS is ${m.version.length ? 'loaded' : ''}. Ergogen is ${version.length ? 'loaded' : ''}.`
|
||||
}
|
||||
}
|
||||
|
|
@ -61,6 +61,12 @@ describe('Prepare', function() {
|
|||
y: 2,
|
||||
z: 3
|
||||
})
|
||||
// should be able to detect circular dependencies and error out
|
||||
p.inherit.bind(this, {
|
||||
a: {
|
||||
$extends: 'a'
|
||||
}
|
||||
}).should.throw('circular dependency')
|
||||
})
|
||||
|
||||
it('parameterize', function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue