Respond to Mike's feedback.
This commit is contained in:
parent
b6431e57ff
commit
d0a5ae6ae3
|
@ -54,12 +54,9 @@ const config: Config.InitialOptions = {
|
|||
"!src/db/views/staticViews.*",
|
||||
"!src/**/*.spec.{js,ts}",
|
||||
"!src/tests/**/*.{js,ts}",
|
||||
// The use of coverage in the JS runner bundles breaks tests
|
||||
"!src/jsRunner/bundles/**/*.{js,ts}",
|
||||
// We have a polyfill for the TextDecoder class in here that gets
|
||||
// injected into the vm for deserializing BSON. If it gets coveraged
|
||||
// it breaks the tests.
|
||||
"!src/jsRunner/vm/isolated-vm.ts",
|
||||
// The use of coverage in the JS runner breaks tests by inserting
|
||||
// coverage functions into code that will run inside of the isolate.
|
||||
"!src/jsRunner/**/*.{js,ts}",
|
||||
],
|
||||
coverageReporters: ["lcov", "json", "clover"],
|
||||
}
|
||||
|
|
|
@ -143,7 +143,7 @@
|
|||
"jest": "29.7.0",
|
||||
"jest-openapi": "0.14.2",
|
||||
"jest-runner": "29.7.0",
|
||||
"nock": "^13.5.4",
|
||||
"nock": "13.5.4",
|
||||
"nodemon": "2.0.15",
|
||||
"openapi-typescript": "5.2.0",
|
||||
"path-to-regexp": "6.2.0",
|
||||
|
|
|
@ -299,7 +299,14 @@ export async function preview(
|
|||
},
|
||||
}
|
||||
|
||||
const { rows, keys, info, extra } = await Runner.run<QueryResponse>(inputs)
|
||||
let queryResponse: QueryResponse
|
||||
try {
|
||||
queryResponse = await Runner.run<QueryResponse>(inputs)
|
||||
} catch (err: any) {
|
||||
ctx.throw(400, err)
|
||||
}
|
||||
|
||||
const { rows, keys, info, extra } = queryResponse
|
||||
const { previewSchema, nestedSchemaFields } = getSchemaFields(rows, keys)
|
||||
|
||||
// if existing schema, update to include any previous schema keys
|
||||
|
|
Loading…
Reference in New Issue