Open Souvikns opened 2 years ago
I think we can do unit tests with jest or other testing framework and just mock the structure of notion blocks. In this way we can make sure that the output is as expected.
I'm not sure if that'll work as each method depends on the notion client SDK (excluding toMarkdownString
). So internally recursive API calls are being made to fetch the child blocks.
I guess we can create a dummy notion document and pass the auth token as an environment variable to the CI/CD. If someone wants to run locally then probably they have to provide theirs.
I've created a base jest infra in #17 we can expand it and create mocks to the notion client API easily with jest.
In the context of testing I would like to talk about two things