feat(core): Load core plugins (plugin bundle) by default
This commit is contained in:
parent
4528e1bc88
commit
b263979ca0
8 changed files with 34 additions and 30 deletions
|
@ -6,24 +6,22 @@ const expect = chai.expect
|
|||
describe('Hooks', () => {
|
||||
it('Should contain all hooks', () => {
|
||||
const pattern = new Pattern()
|
||||
const h = pattern.plugins.hooks
|
||||
const test = {
|
||||
preInit: [],
|
||||
postInit: [],
|
||||
preDraft: [],
|
||||
preSetDraft: [],
|
||||
prePartDraft: [],
|
||||
postPartDraft: [],
|
||||
postSetDraft: [],
|
||||
postDraft: [],
|
||||
preSample: [],
|
||||
postSample: [],
|
||||
preRender: [],
|
||||
preLayout: [],
|
||||
postLayout: [],
|
||||
postRender: [],
|
||||
insertText: [],
|
||||
}
|
||||
expect(h).to.eql(test)
|
||||
expect(Object.keys(pattern.plugins.hooks)).to.eql([
|
||||
'preInit',
|
||||
'postInit',
|
||||
'preDraft',
|
||||
'preSetDraft',
|
||||
'prePartDraft',
|
||||
'postPartDraft',
|
||||
'postSetDraft',
|
||||
'postDraft',
|
||||
'preSample',
|
||||
'postSample',
|
||||
'preRender',
|
||||
'preLayout',
|
||||
'postLayout',
|
||||
'postRender',
|
||||
'insertText',
|
||||
])
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue