Skip to content
This repository has been archived by the owner on Feb 5, 2020. It is now read-only.

Ivan cardel patch 1 #21

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@


[![Build Status](https://dev.azure.com/jics0804930955/jics080493/_apis/build/status/IvanCardel.ContosoAir?branchName=master)](https://dev.azure.com/jics0804930955/jics080493/_build/latest?definitionId=1&branchName=master)

# Microsoft.Github CI Demo

Expand Down
36 changes: 36 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
pool:
vmImage: ubuntu-16.04
trigger:
- master
steps:
- task: Npm@1
inputs:
command: install
- script: 'npm test'
displayName: 'Run unit tests'
continueOnError: true
- task: PublishTestResults@2
displayName: 'Publish Test Results'
condition: succeededOrFailed()
inputs:
testResultsFiles: $(System.DefaultWorkingDirectory)/test-report.xml
- task: PublishCodeCoverageResults@1
displayName: 'Publish Code Coverage'
condition: 'in(variables[''Agent.JobStatus''], ''Succeeded'')'
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage/*coverage.xml'
reportDirectory: $(System.DefaultWorkingDirectory)/coverage
- task: ArchiveFiles@2
displayName: 'Archive sources'
inputs:
rootFolderOrFile: $(Build.SourcesDirectory)
includeRootFolder: false
- task: CopyFiles@2
displayName: 'Copy ARM templates'
inputs:
SourceFolder: deployment
Contents: '*.json'
TargetFolder: $(build.artifactstagingdirectory)/Templates
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ class AirportsService {
}

getAll(){
return this._airports.filter(a => a.code).map(avoidEmptyCity);
}
return this._airports.filter(a => a.code).map(avoidEmptyCity).sort((a, b) => (a.city > b.city) ? 1 : -1);
}



getByCode(code) {
return avoidEmptyCity(this._airports.find(a => a.code == code));
}
}

module.exports = AirportsService;
module.exports = AirportsService;