Skip to content

Commit

Permalink
Add auth testing for AzureDevOps services with testAuth
Browse files Browse the repository at this point in the history
  • Loading branch information
jNullj committed Mar 24, 2024
1 parent 57163eb commit 6a74894
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
33 changes: 33 additions & 0 deletions services/azure-devops/azure-devops-coverage.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { testAuth } from '../test-helpers.js'
import AzureDevOpsCoverage from './azure-devops-coverage.service.js'

describe('AzureDevOpsCoverage', function () {
describe('auth', function () {
it('sends the auth information as configured', async function () {
testAuth(
AzureDevOpsCoverage,
'BasicAuth',
{
coverageData: [
{
coverageStats: [
{
label: 'Coverage',
total: 95,
covered: 93,
},
],
},
],
count: 1,
value: [
{
id: 90395,
},
],
},
{ multipleRequests: true },
)
})
})
})
35 changes: 35 additions & 0 deletions services/azure-devops/azure-devops-tests.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { testAuth } from '../test-helpers.js'
import AzureDevOpsTests from './azure-devops-tests.service.js'

describe('AzureDevOpsTests', function () {
describe('auth', function () {
it('sends the auth information as configured', async function () {
testAuth(
AzureDevOpsTests,
'BasicAuth',
{
aggregatedResultsAnalysis: {
totalTests: 95,
resultsbyOutcome: {
Passed: {
count: 93,
},
},
},
count: 1,
value: [
{
id: 90395,
},
],
},
{
exampleOverride: {
compact_message: undefined,
},
multipleRequests: true,
},
)
})
})
})

0 comments on commit 6a74894

Please sign in to comment.