@everestate/serverless-router-dynamics
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -8,6 +8,6 @@ const createLazyContext = require('../createLazyContext'); | ||
const subj = payload => createLazyContext(payload); | ||
const subj = (payload) => createLazyContext(payload); | ||
describe('createLazyContext', () => { | ||
describe('on Create request', () => | ||
describe('on Create request', () => { | ||
test('extracts entity and id', () => | ||
@@ -39,5 +39,6 @@ expect(subj(webhookRequestOnLeadCreate.body)).toMatchObject({ | ||
}, | ||
}))); | ||
})); | ||
}); | ||
describe('on Update request', () => | ||
describe('on Update request', () => { | ||
test('extracts entity', () => | ||
@@ -53,5 +54,6 @@ expect(subj(webhookRequestOnLeadUpdate.body)).toMatchObject({ | ||
}, | ||
}))); | ||
})); | ||
}); | ||
describe('on Assign request', () => | ||
describe('on Assign request', () => { | ||
test('extracts entity', () => | ||
@@ -61,5 +63,6 @@ expect(subj(webhookRequestOnOpportunityAssign.body)).toMatchObject({ | ||
entity: {}, | ||
}))); | ||
})); | ||
}); | ||
describe('on Delete request', () => | ||
describe('on Delete request', () => { | ||
test('extracts entity', () => | ||
@@ -69,3 +72,4 @@ expect(subj(webhookRequestOnLeadDelete.body)).toMatchObject({ | ||
entity: {}, | ||
}))); | ||
})); | ||
}); | ||
}); |
@@ -19,5 +19,5 @@ const Router = require('@everestate/serverless-router'); | ||
describe('Dynamics', () => { | ||
describe('on Create request', () => | ||
test('invokes matching callback', () => | ||
expect(subj().dispatch(webhookRequestOnLeadCreate)).toEqual({ | ||
describe('on Create request', () => { | ||
test('invokes matching callback', async () => | ||
expect(await subj().dispatch(webhookRequestOnLeadCreate)).toEqual({ | ||
lead: 'create', | ||
@@ -51,7 +51,8 @@ ctx: { | ||
event: webhookRequestOnLeadCreate, | ||
}))); | ||
})); | ||
}); | ||
describe('on Update request', () => | ||
test('invokes matching callback', () => | ||
expect(subj().dispatch(webhookRequestOnLeadUpdate)).toEqual({ | ||
describe('on Update request', () => { | ||
test('invokes matching callback', async () => | ||
expect(await subj().dispatch(webhookRequestOnLeadUpdate)).toEqual({ | ||
lead: 'update', | ||
@@ -69,7 +70,8 @@ ctx: { | ||
event: webhookRequestOnLeadUpdate, | ||
}))); | ||
})); | ||
}); | ||
describe('on Delete request', () => | ||
test('invokes matching callback', () => | ||
expect(subj().dispatch(webhookRequestOnLeadDelete)).toEqual({ | ||
describe('on Delete request', () => { | ||
test('invokes matching callback', async () => | ||
expect(await subj().dispatch(webhookRequestOnLeadDelete)).toEqual({ | ||
lead: 'delete', | ||
@@ -81,6 +83,7 @@ ctx: { | ||
event: webhookRequestOnLeadDelete, | ||
}))); | ||
})); | ||
}); | ||
describe('on Assign request', () => | ||
test('invokes matching callback', () => expect(subj().dispatch(webhookRequestOnOpportunityAssign)).toEqual({ | ||
describe('on Assign request', () => { | ||
test('invokes matching callback', async () => expect(await subj().dispatch(webhookRequestOnOpportunityAssign)).toEqual({ | ||
opportunity: 'assign', | ||
@@ -92,3 +95,4 @@ ctx: { | ||
event: webhookRequestOnOpportunityAssign, | ||
}))); | ||
})); | ||
}); | ||
@@ -95,0 +99,0 @@ test('pluginName', () => |
{ | ||
"name": "@everestate/serverless-router-dynamics", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "Serverless Router plugin to handle Microsoft Dynamics Webhooks", | ||
@@ -39,8 +39,8 @@ "keywords": [ | ||
"devDependencies": { | ||
"eslint": "^5.12.1", | ||
"eslint-config-airbnb-base": "^13.1.0", | ||
"eslint-plugin-import": "^2.15.0", | ||
"eslint-plugin-jest": "^22.1.3", | ||
"jest": "^23.6.0" | ||
"eslint": "^6.2.2", | ||
"eslint-config-airbnb-base": "^14.0.0", | ||
"eslint-plugin-import": "^2.18.2", | ||
"eslint-plugin-jest": "^22.15.2", | ||
"jest": "^24.9.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
443
48809
16
1