mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-16 01:24:05 -08:00
34 lines
531 B
TypeScript
34 lines
531 B
TypeScript
import { formatBlocks } from '../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',
|
|
},
|
|
},
|
|
],
|
|
},
|
|
},
|
|
]);
|
|
});
|
|
});
|