gatsby-source-wordpress
Version:
Source data from WordPress in an efficient and scalable way.
20 lines (15 loc) • 618 B
JavaScript
import { getPluginOptionsMdString } from "../generate-plugin-options-docs"
import fs from "fs-extra"
import path from "path"
describe(`Plugin options docs`, () => {
test(`Docs have been generated by running "yarn build" or "yarn generate-plugin-options-docs"`, async () => {
const generatedDocsFileContents = await fs.readFile(
path.join(__dirname, `../docs/plugin-options.md`),
`utf-8`
)
const mdString = await getPluginOptionsMdString()
expect(generatedDocsFileContents).toBeTruthy()
expect(mdString).toBeTruthy()
expect(generatedDocsFileContents).toEqual(mdString)
})
})