Fix tests for pluginSpecificConfiguration

This commit is contained in:
Alexander James Phillips
2017-05-17 12:48:26 +01:00
committed by Simon Schick
parent 95144bb247
commit cbda0a036b

View File

@@ -44,6 +44,15 @@ new Hapi.Server({
}]
});
//+ Code added in addition to docs
declare module 'hapi' {
interface PluginSpecificConfiguration {
// Set this to non optional if plugin config is non optional
'some-plugin-name'?: {options: string;};
}
}
//- Code added in addition to docs
new Hapi.Server({
connections: {
app: {},
@@ -54,7 +63,8 @@ new Hapi.Server({
maxEventLoopDelay: 10,
},
plugins: {
'some-plugin-name': {options: 'here'}
'some-plugin-name': {options: 'here'},
coolPlugin: {optionA: ""},
},
router: {
isCaseSensitive: false,