diff --git a/packages/docutils/lib/logger.ts b/packages/docutils/lib/logger.ts index 4a40ef874..17109f620 100644 --- a/packages/docutils/lib/logger.ts +++ b/packages/docutils/lib/logger.ts @@ -32,34 +32,34 @@ class DocutilsReporter extends FancyReporter { /** * Mapping of log types (the name of the logging method called) to chalk fg colors */ - static TYPE_COLOR_MAP = { + static readonly TYPE_COLOR_MAP = { info: 'cyan', success: 'green', error: 'red', warn: 'yellow', - } as const; + } satisfies {[k in LogType]?: typeof ForegroundColor}; /** * Mapping of log levels to chalk fg colors */ - static LEVEL_COLORS = { + static readonly LEVEL_COLORS = { 0: 'red', 1: 'yellow', 2: 'white', 3: 'green', - } as const; + } satisfies {[k in LogLevel]?: typeof ForegroundColor}; /** * Mapping of log types to icons/symbols */ - static TYPE_ICONS = { + static readonly TYPE_ICONS = { info: logSymbols.info, success: logSymbols.success, error: logSymbols.error, warn: logSymbols.warning, debug: figures('›'), trace: figures('›'), - } as const; + } satisfies {[k in LogType]?: string}; /** * Default color to use if we can't find a color for the log type or level @@ -191,8 +191,3 @@ function createLogProxy(logger: Consola): Consola { * @see {createLogProxy} */ export default rootLogger; - -// these are just type-sanity checks -<{[k in LogType]?: typeof ForegroundColor}>DocutilsReporter.TYPE_COLOR_MAP; -<{[k in LogLevel]?: typeof ForegroundColor}>DocutilsReporter.LEVEL_COLORS; -<{[k in LogType]?: string}>DocutilsReporter.TYPE_ICONS; diff --git a/packages/typedoc-plugin-appium/package.json b/packages/typedoc-plugin-appium/package.json index b33ba997e..ffaceb20b 100644 --- a/packages/typedoc-plugin-appium/package.json +++ b/packages/typedoc-plugin-appium/package.json @@ -26,7 +26,7 @@ "build": "cpy lib/theme/resources build", "clean": "npx rimraf build/lib/theme/resources", "test": "run-s test:unit", - "test:e2e": "mocha --timeout 20s \"test/e2e/**/*.e2e.spec.ts\"", + "test:e2e": "mocha --timeout 20s \"test/e2e/index.e2e.spec.ts\" && mocha --timeout 20s \"test/e2e/converter/builtin-external-driver.e2e.spec.ts\" && mocha --timeout 20s \"test/e2e/converter/builtin-method-map.e2e.spec.ts\" && mocha --timeout 20s \"test/e2e/converter/converter.e2e.spec.ts\" && mocha --timeout 20s \"test/e2e/converter/external.e2e.spec.ts\"", "test:smoke": "node ./index.js", "test:unit": "mocha --timeout 2s \"test/unit/**/*.spec.ts\"" },