Add tests as a Docker build step to ensure no container with failing tests can be published

Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
Fred Boniface
2023-08-02 21:32:58 +01:00
parent ab2aa09861
commit 5504439ce0
5 changed files with 17 additions and 25 deletions

View File

@@ -89,10 +89,11 @@ function transformTrainServices(input: any): TrainServices[] {
function transformLocation(input: any): ServiceLocation[] {
console.debug(`staffStation.transformLocation running`)
let output: ServiceLocation[] = []
if (!Array.isArray(input)) {
input = [input]
let locations: any[] = input.location
if (!Array.isArray(input.location)) {
locations = [input.location]
}
for (const item of input) {
for (const item of locations) {
const location: ServiceLocation = {
tiploc: item?.tiploc,
name: item?.locationName