mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 19:32:15 +00:00
ci: Expand ESLint to tests in BE packages (no-changelog) (#6147)
* 🔧 Adjust base ESLint config * 🔧 Adjust `lint` and `lintfix` in `nodes-base` * 🔧 Include `test` and `utils` in `nodes-base` * 📘 Convert JS tests to TS * 👕 Apply lintfixes
This commit is contained in:
30
packages/nodes-base/test/nodes/Stripe/helpers.test.ts
Normal file
30
packages/nodes-base/test/nodes/Stripe/helpers.test.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
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);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user