velocious 1.0.107 → 1.0.108
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import fetch from "node-fetch"
|
|
2
|
+
|
|
3
|
+
import Dummy from "../dummy/index.js"
|
|
4
|
+
|
|
5
|
+
describe("HttpServer - namespace", {databaseCleaning: {transaction: false, truncate: true}}, async () => {
|
|
6
|
+
it("handles post requests", async () => {
|
|
7
|
+
await Dummy.run(async () => {
|
|
8
|
+
const response = await fetch(
|
|
9
|
+
"http://localhost:3006/api/version",
|
|
10
|
+
{method: "POST"}
|
|
11
|
+
)
|
|
12
|
+
const data = /** @type {Record<string, any>} */ (await response.json())
|
|
13
|
+
|
|
14
|
+
expect(data.version).toEqual("2.1")
|
|
15
|
+
})
|
|
16
|
+
})
|
|
17
|
+
})
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import restArgsError from "../utils/rest-args-error.js"
|
|
4
4
|
import BaseRoute from "./base-route.js"
|
|
5
|
-
import BasicRoute from "./
|
|
5
|
+
import BasicRoute from "./basic-route.js"
|
|
6
6
|
import escapeStringRegexp from "escape-string-regexp"
|
|
7
7
|
|
|
8
8
|
class VelociousRouteNamespaceRoute extends BasicRoute {
|