1
0
Fork 0

refactor (core) move draft handling into its own class

This commit is contained in:
Enoch Riese 2023-04-17 19:45:00 -04:00
parent 9e8db66c94
commit 8fea9a4beb
5 changed files with 232 additions and 205 deletions

View file

@ -33,18 +33,6 @@ describe('Pattern', () => {
expect(count).to.equal(2)
})
})
describe('Pattern.createPartForSet()', () => {
it('Should not allow malicious assignment to Object.prototype', () => {
const objProto = Object.prototype
const Pattern = new Design()
const pattern = new Pattern()
expect(() => pattern.createPartForSet('part', '__proto__')).to.throw(
'malicious attempt at altering Object.prototype. Stopping action'
)
expect(objProto).to.equal(Object.prototype)
})
})
it('Should check whether a part is needed', () => {
const partA = {
name: 'test.partA',