This commit is contained in:
Robert Mosolgo 2020-11-25 16:30:37 -05:00
Родитель aeedfac37e
Коммит fc54b4d43c
2 изменённых файлов: 4 добавлений и 4 удалений

3
.github/workflows/test.yml поставляемый
Просмотреть файл

@ -36,7 +36,8 @@ jobs:
strategy:
fail-fast: false
matrix:
test-group: [content, meta, rendering, routing, unit, links-and-images, graphql]
test-group:
[content, meta, rendering, routing, unit, links-and-images, graphql]
steps:
# Each of these ifs needs to be repeated at each step to make sure the required check still runs
# Even if if doesn't do anything

Просмотреть файл

@ -1,7 +1,7 @@
const yaml = require('js-yaml')
const { createChangelogEntry, cleanPreviewTitle, previewAnchor, prependDatedEntry } = require('../../script/graphql/build-changelog')
const fs = require('fs')
const MockDate = require("mockdate")
const MockDate = require('mockdate')
const expectedChangelogEntry = require('../fixtures/changelog-entry')
const expectedUpdatedChangelogFile = require('../fixtures/updated-changelog-file')
@ -116,7 +116,7 @@ describe('updating the changelog file', () => {
const previousContents = fs.readFileSync(testTargetPath)
const exampleEntry = { someStuff: true }
const expectedDate = "2020-11-20"
const expectedDate = '2020-11-20'
MockDate.set(expectedDate)
prependDatedEntry(exampleEntry, testTargetPath)
@ -124,7 +124,6 @@ describe('updating the changelog file', () => {
// reset the file:
fs.writeFileSync(testTargetPath, previousContents)
expect(exampleEntry).toEqual({ someStuff: true, date: expectedDate })
expect(JSON.parse(newContents)).toEqual(expectedUpdatedChangelogFile)
})