зеркало из https://github.com/github/docs.git
Fix lint errors
This commit is contained in:
Родитель
aeedfac37e
Коммит
fc54b4d43c
|
@ -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)
|
||||
})
|
||||
|
|
Загрузка…
Ссылка в новой задаче