mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
34 lines
538 B
TypeScript
34 lines
538 B
TypeScript
import { formatBlocks } from '../shared/GenericFunctions';
|
|
|
|
describe('Test NotionV2, formatBlocks', () => {
|
|
it('should format to_do block', () => {
|
|
const blocks = [
|
|
{
|
|
type: 'to_do',
|
|
checked: false,
|
|
richText: false,
|
|
textContent: 'Testing',
|
|
},
|
|
];
|
|
|
|
const result = formatBlocks(blocks);
|
|
|
|
expect(result).toEqual([
|
|
{
|
|
object: 'block',
|
|
type: 'to_do',
|
|
to_do: {
|
|
checked: false,
|
|
text: [
|
|
{
|
|
text: {
|
|
content: 'Testing',
|
|
},
|
|
},
|
|
],
|
|
},
|
|
},
|
|
]);
|
|
});
|
|
});
|