Add custom plugins tests (#5383)
* add tests for the plugin API * make plugin invocation optional It could be that an object has been passed as a plugin, in that case we will use the `handler` function from the object. If it doesn't exist, then we will only take the `config` section out of it.
This commit is contained in:
parent
c315db5f15
commit
2dac5bb569
2 changed files with 1895 additions and 1 deletions
|
|
@ -499,7 +499,7 @@ function registerPlugins(plugins, context) {
|
|||
pluginItem(pluginApi)
|
||||
}
|
||||
} else {
|
||||
plugin(pluginApi)
|
||||
plugin?.(pluginApi)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
1894
tests/custom-plugins.test.js
Normal file
1894
tests/custom-plugins.test.js
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue