test/integration-test/plugin/MyPlugin2.test.js
import assert from 'assert';
describe('test/plugin/MyPlugin2:', ()=>{
it('calls handlers', () => {
return new Promise((resolve, reject) => {
const callInfo = require('./MyPlugin2').callInfo;
assert.deepEqual(callInfo.handlerNames, {
onStart: true,
onHandleConfig: true,
onHandleCode: true,
onHandleCodeParser: true,
onHandleAST: true,
onHandleDocs: true,
onPublish: true,
onHandleContent: true,
onComplete: true
});
resolve();
});
});
});