fix(tests): Increased coverage of REST API validators

This commit is contained in:
Chris Troutner
2022-09-17 14:18:16 -07:00
parent d266bcc54b
commit d9377ea78b
15 changed files with 534 additions and 259 deletions
+6 -1
View File
@@ -5,9 +5,14 @@
/* eslint no-unneeded-ternary:0 */
// Hack to get __dirname back.
// https://blog.logrocket.com/alternatives-dirname-node-js-es-modules/
import * as url from 'url'
// Get the version from the package.json file.
import { readFileSync } from 'fs'
const pkgInfo = JSON.parse(readFileSync('package.json'))
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
const pkgInfo = JSON.parse(readFileSync(`${__dirname.toString()}/../../package.json`))
const version = pkgInfo.version