Skip to content

Commit

Permalink
chore: update test data and generation tooling
Browse files Browse the repository at this point in the history
Signed-off-by: Tierney Cyren <[email protected]>
  • Loading branch information
bnb committed Aug 26, 2024
1 parent df455d0 commit 1481564
Show file tree
Hide file tree
Showing 4 changed files with 289 additions and 1,080 deletions.
4 changes: 4 additions & 0 deletions templates/test/generateBody.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ const generateRepoInformationFromData = require('../tools/generateRepoInformatio
const generateBody = require('../tools/generateBody')
const dates = require('../testUtils/dates.json')

// if this test is failing, consider using the provided npm scripts in this workspace to regenerate test data!
test('working with the core module directly should not error', async (context) => {
// generate our live data
const data = await core('nodejs', dates)
// generate it into the composition that we want our live data to be consumed with
const composedData = await generateRepoInformationFromData(data)
/// read a reference file that's generated by running a generation script in the testUtils directory, optionally run with npm run
const reference = await readFile(resolve(`${dir}/testUtils/reference/body.md`), { encoding: 'utf8' })

await context.test('check that generated output has not changed', async (context) => {
Expand Down
Loading

0 comments on commit 1481564

Please sign in to comment.