2024-02-04 12:14:42 +01:00
|
|
|
import { expect } from 'chai'
|
2022-09-09 20:20:38 +02:00
|
|
|
import { Pattern } from '../src/index.mjs'
|
2022-08-25 11:47:54 +02:00
|
|
|
|
2022-08-27 09:27:07 +02:00
|
|
|
describe('Hooks', () => {
|
2022-09-09 20:20:38 +02:00
|
|
|
it('Should contain all hooks', () => {
|
|
|
|
const pattern = new Pattern()
|
2023-09-07 11:25:57 +02:00
|
|
|
expect(Object.keys(pattern.plugins.hooks)).to.eql([
|
|
|
|
'preInit',
|
|
|
|
'postInit',
|
|
|
|
'preDraft',
|
|
|
|
'preSetDraft',
|
|
|
|
'prePartDraft',
|
|
|
|
'postPartDraft',
|
|
|
|
'postSetDraft',
|
|
|
|
'postDraft',
|
|
|
|
'preSample',
|
|
|
|
'postSample',
|
|
|
|
'preRender',
|
|
|
|
'preLayout',
|
|
|
|
'postLayout',
|
|
|
|
'postRender',
|
|
|
|
'insertText',
|
|
|
|
])
|
2022-09-09 20:20:38 +02:00
|
|
|
})
|
|
|
|
})
|