INNER CODE UNIT · JavaScript
expectCompiled
ACloudGuru/serverless-plugin-aws-alerts · src/index.test.js:1086
const expectCompiled = (config, definitions, alertTopics) => {
expect(plugin.getConfig.mock.calls.length).toEqual(1);
expect(plugin.getDefinitions.mock.calls.length).toEqual(1);
expect(plugin.getDefinitions.mock.calls[0][0]).toEqual(config);
expect(plugin.compileAlertTopics.mock.calls.length).toEqual(1);
expect(plugin.compileAlertTopics.mock.calls[0][0]).toEqual(config);
expect(plugin.compileAlarms.mock.calls.length).toEqual(1);
expect(plugin.compileAlarms.mock.calls[0][0]).toEqual(config);
expect(plugin.compileAlarms.mock.calls[0][1]).toEqual(definitions);
expect(plugin.compileAlarms.mock.calls[0][2]).toEqual(alertTopics);
};
beforeEach(() => {
plugin = pluginFactory({}, stage);