You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When the project is cloned from the master branch, one of the test suites fails.
To Reproduce
Steps to reproduce the behavior:
Clone this project
run npm install
run npm run test
Two tests for src/readme.spec.js should fail. They should be:
should return readme default template no html content
should return readme default template content
Expected behavior
Tests should not fail when the project is cloned from the master branch.
Desktop (please complete the following information):
OS: Linux, Manjaro
Browse Firefox
Version 86.0
Additional context
The issue seems to be caused by the snapshot README file in src/__snapshots__ folder. The two lines in the file causing the problem are:
it('should return readme default template no html content',async()=>{constresult=awaitbuildReadmeContent(context,defaultNoHtmlTemplatePath)expect(result).toMatchSnapshot()})
It seems like the readme built for test contains a copyright year of 2021 instead of 2019.
The text was updated successfully, but these errors were encountered:
it('should return readme default template no html content',async()=>{constresult=awaitbuildReadmeContent(context,defaultNoHtmlTemplatePath)constcurrentDate=newDate()expect(result.replace(currentDate.getFullYear(),'2019')).toMatchSnapshot()})
This approach will let the original snapshot pass the tests. Another approach is to change the year within the snapshot but that would require updating the snapshot every year.
Describe the bug
When the project is cloned from the master branch, one of the test suites fails.
To Reproduce
Steps to reproduce the behavior:
npm install
npm run test
src/readme.spec.js
should fail. They should be:should return readme default template no html content
should return readme default template content
Expected behavior
Tests should not fail when the project is cloned from the master branch.
Desktop (please complete the following information):
Additional context
The issue seems to be caused by the snapshot README file in
src/__snapshots__
folder. The two lines in the file causing the problem are:Copyright © 2019 [Franck Abgrall](https://github.com/kefranabg).<br />
Copyright © 2019 [Franck Abgrall](https://github.com/kefranabg).
One of the offending tests is this one:
It seems like the readme built for test contains a copyright year of
2021
instead of2019
.The text was updated successfully, but these errors were encountered: