mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(Postgres Node): Account for JSON expressions (#12012)
Co-authored-by: Shireen Missi <94372015+ShireenMissi@users.noreply.github.com>
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
replaceEmptyStringsByNulls,
|
||||
wrapData,
|
||||
convertArraysToPostgresFormat,
|
||||
isJSON,
|
||||
} from '../../v2/helpers/utils';
|
||||
|
||||
const node: INode = {
|
||||
@@ -26,6 +27,15 @@ const node: INode = {
|
||||
},
|
||||
};
|
||||
|
||||
describe('Test PostgresV2, isJSON', () => {
|
||||
it('should return true for valid JSON', () => {
|
||||
expect(isJSON('{"key": "value"}')).toEqual(true);
|
||||
});
|
||||
it('should return false for invalid JSON', () => {
|
||||
expect(isJSON('{"key": "value"')).toEqual(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Test PostgresV2, wrapData', () => {
|
||||
it('should wrap object in json', () => {
|
||||
const data = {
|
||||
|
||||
Reference in New Issue
Block a user