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

changes #23

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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[![Build Status](https://dev.azure.com/risilvei/GitHub/_apis/build/status/ritascosta.ContosoAir?branchName=master)](https://dev.azure.com/risilvei/GitHub/_build/latest?definitionId=26&branchName=master)


Rita

# Microsoft.Github CI Demo

Expand Down
41 changes: 41 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Node.js
# Build a general Node.js project with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript

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'
5 changes: 3 additions & 2 deletions src/services/airports.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ 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;
//end