mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 14:44:05 -08: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',
|
|
},
|
|
},
|
|
],
|
|
},
|
|
},
|
|
]);
|
|
});
|
|
});
|