-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: move tests into lib #5635
fix: move tests into lib #5635
Conversation
3d8cb4f
to
32941d9
Compare
Ready for review @rarkins |
@@ -9,7 +9,7 @@ describe('platform/azure/helpers', () => { | |||
// reset module | |||
jest.resetModules(); | |||
jest.mock('../../../lib/platform/azure/azure-got-wrapper'); | |||
azureHelper = require('../../../lib/platform/azure/azure-helper'); | |||
azureHelper = require('.../../../lib/platform/azure/azure-helper'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
azureHelper = require('.../../../lib/platform/azure/azure-helper'); | |
azureHelper = require('./azure-helper'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done everywhere in all the test files.
@@ -179,7 +179,7 @@ function generateServerResponses(endpoint) { | |||
[`${endpoint}/rest/api/1.0/projects/SOME/repos/repo/pull-requests/5/commits?withCounts=true`]: { | |||
GET: { | |||
totalCount: 1, | |||
values: [ { author: { emailAddress: 'bot@renovateapp.com'} } ], | |||
values: [{ author: { emailAddress: 'bot@renovateapp.com' } }], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@viceice on one hand I was going to say "Revert formatting changes to fixtures" but on the other hand I wonder if this file is an indicator that prettier is picking up *.ts files within __fixtures__
and needs reconfiguring?
import { GotFn } from '../../../lib/util/got'; | ||
import { GiteaGotApi } from '../../../lib/platform/gitea/gitea-got-wrapper'; | ||
import { GotResponse } from '..'; | ||
import { partial } from '../../../test/util'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to work out what to do about this util file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes please suggest, until then keeping as is.
lib/versioning/poetry/poetry.spec.ts
Outdated
@@ -1,4 +1,4 @@ | |||
import { api as semver } from '../../lib/versioning/poetry'; | |||
import { api as semver } from '.'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should rename these types of files to index.spec.ts
now that they're within lib
. Please check all versioning, manager and datasource ones
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay will change the names
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with this too.
@viceice any ideas on what to do about the test/util code that remains? |
…suesarrised due to changes
…fixes path issues
c01c5bb
to
a6d9793
Compare
Again ready for review @rarkins with all the suggested changes and renaming of test files done. |
🎉 This PR is included in version 19.158.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Moves all the test files from test folder to lib folder
Closes #5606