mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-16 09:34:07 -08:00
4dac848758
* ⚡ Extend `.prettierignore` patterns * 🎨 Apply Prettier to `/src` and `/test` * 🎨 Update `.prettierignore` * ✏️ Group dirs with same nesting level * ✏️ Alphabetize credentials
31 lines
622 B
JavaScript
31 lines
622 B
JavaScript
const helpers = require('../../../nodes/Stripe/helpers');
|
|
|
|
describe('adjustMetadata', () => {
|
|
it('it should adjust multiple metadata values', async () => {
|
|
const additionalFieldsValues = {
|
|
metadata: {
|
|
metadataProperties: [
|
|
{
|
|
key: 'keyA',
|
|
value: 'valueA',
|
|
},
|
|
{
|
|
key: 'keyB',
|
|
value: 'valueB',
|
|
},
|
|
],
|
|
},
|
|
};
|
|
|
|
const adjustedMetadata = helpers.adjustMetadata(additionalFieldsValues);
|
|
|
|
const expectedAdjustedMetadata = {
|
|
metadata: {
|
|
keyA: 'valueA',
|
|
keyB: 'valueB',
|
|
},
|
|
};
|
|
expect(adjustedMetadata).toStrictEqual(expectedAdjustedMetadata);
|
|
});
|
|
});
|