2022-09-09 20:20:38 +02:00
|
|
|
import chai from 'chai'
|
|
|
|
import { Pattern } from '../src/index.mjs'
|
2022-08-25 11:47:54 +02:00
|
|
|
|
|
|
|
const expect = chai.expect
|
2018-08-12 12:37:30 +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-04-18 00:00:25 -04:00
|
|
|
const h = pattern.plugins.hooks
|
2022-08-27 09:27:07 +02:00
|
|
|
const test = {
|
2022-09-18 22:48:55 +02:00
|
|
|
preInit: [],
|
|
|
|
postInit: [],
|
2022-08-27 09:27:07 +02:00
|
|
|
preDraft: [],
|
2022-09-18 22:48:55 +02:00
|
|
|
preSetDraft: [],
|
|
|
|
prePartDraft: [],
|
|
|
|
postPartDraft: [],
|
|
|
|
postSetDraft: [],
|
2022-08-27 09:27:07 +02:00
|
|
|
postDraft: [],
|
|
|
|
preSample: [],
|
|
|
|
postSample: [],
|
|
|
|
preRender: [],
|
2022-11-14 16:33:57 -06:00
|
|
|
preLayout: [],
|
2022-09-18 22:48:55 +02:00
|
|
|
postLayout: [],
|
2022-08-27 09:27:07 +02:00
|
|
|
postRender: [],
|
|
|
|
insertText: [],
|
2022-09-09 20:20:38 +02:00
|
|
|
}
|
|
|
|
expect(h).to.eql(test)
|
|
|
|
})
|
|
|
|
})
|