typespeed 2.4.4 → 2.4.6

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.
@@ -38,7 +38,7 @@ class Redis extends ioredis_1.default {
38
38
  if (!(0, typespeed_1.config)("redis")) {
39
39
  return null;
40
40
  }
41
- if (mode === "sub") {
41
+ if (mode === "pub") {
42
42
  this.pubObj = this.pubObj || new Redis((0, typespeed_1.config)("redis"));
43
43
  return this.pubObj;
44
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typespeed",
3
- "version": "2.4.4",
3
+ "version": "2.4.6",
4
4
  "description": "A new Framework for TypeScript.",
5
5
  "author": "speedphp",
6
6
  "license": "MIT License",
@@ -57,13 +57,13 @@
57
57
  "devDependencies": {
58
58
  "@types/express": "^4.17.13",
59
59
  "@types/mocha": "^10.0.1",
60
- "@types/node": "^18.0.6",
60
+ "@types/node": "^18.19.3",
61
61
  "chai": "4.3.7",
62
62
  "chai-http": "^4.4.0",
63
63
  "mocha": "10.2.0",
64
64
  "nyc": "^15.1.0",
65
+ "socket.io-client": "4.7.1",
65
66
  "ts-node": "^10.9.1",
66
- "typescript": "^4.9.5",
67
- "socket.io-client": "4.7.1"
67
+ "typescript": "^4.9.5"
68
68
  }
69
69
  }
@@ -34,7 +34,7 @@ class Redis extends IoRedis {
34
34
  if (!config("redis")) {
35
35
  return null;
36
36
  }
37
- if (mode === "sub") {
37
+ if (mode === "pub") {
38
38
  this.pubObj = this.pubObj || new Redis(config("redis"));
39
39
  return this.pubObj;
40
40
  } else {
@@ -43,6 +43,14 @@ describe("Test Database", () => {
43
43
  done();
44
44
  });
45
45
  });
46
+ it("/db/select-row twice", (done) => {
47
+ chaiObj.request(testAddr).get("/db/select-row?id=" + randomId).end((err, res) => {
48
+ const dataList = JSON.parse(res.text);
49
+ expect(dataList).to.be.an('array');
50
+ expect(dataList[0]).to.have.property("id").which.is.a("number").equal(randomId);
51
+ done();
52
+ });
53
+ });
46
54
  it("/db/select", (done) => {
47
55
  chaiObj.request(testAddr).get("/db/select").end((err, res) => {
48
56
  const dataList = JSON.parse(res.text);