From 5ea3963a7776968a523a650171962f65e72f5ea9 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Thu, 14 Sep 2023 21:14:13 +0100 Subject: [PATCH] Fix tests for new output for estimated and actual times. Clientside can now directly display the value if it is a string, or if date should be displayed in suitable format. Signed-off-by: Fred Boniface --- test/utils/translators/ldb/stationOutputs.ts | 4 ++-- tsconfig.json | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/utils/translators/ldb/stationOutputs.ts b/test/utils/translators/ldb/stationOutputs.ts index dae3fe7..7044cb7 100644 --- a/test/utils/translators/ldb/stationOutputs.ts +++ b/test/utils/translators/ldb/stationOutputs.ts @@ -26,7 +26,7 @@ export const outputs: StaffLdb[] = [ ata: expect.any(Date), arrivalType: "Actual", std: expect.any(Date), - etd: expect.any(Date), + etd: "RT", departureType: "Estimated", platform: "5", length: 10, @@ -59,7 +59,7 @@ export const outputs: StaffLdb[] = [ ata: expect.any(Date), arrivalType: "Actual", std: expect.any(Date), - etd: expect.any(Date), + etd: "RT", departureType: "Estimated", platform: "5", length: 10, diff --git a/tsconfig.json b/tsconfig.json index 39e9744..2aff194 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -25,7 +25,7 @@ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ /* Modules */ - "module": "commonjs" /* Specify what module code is generated. */, + "module": "Node16" /* Specify what module code is generated. */, // "rootDir": "./", /* Specify the root folder within your source files. */ "moduleResolution": "node16" /* Specify how TypeScript looks up a file from a given module specifier. */, // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ @@ -52,11 +52,11 @@ // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ // "declarationMap": true, /* Create sourcemaps for d.ts files. */ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ - // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + "sourceMap": true, /* Create source map files for emitted JavaScript files. */ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ "outDir": "./dist" /* Specify an output folder for all emitted files. */, - // "removeComments": true, /* Disable emitting comments. */ + "removeComments": true, /* Disable emitting comments. */ // "noEmit": true, /* Disable emitting files from a compilation. */ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */