@nzz/q-cli 1.8.0 → 1.8.1

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nzz/q-cli",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "Cli tool to setup new Q tools, new Q server implementations and start Q dev server to test developing Q tools",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,17 @@
1
+ import type { Config } from "@jest/types";
2
+
3
+ // Sync object
4
+ const config: Config.InitialOptions = {
5
+ verbose: true,
6
+ transform: {
7
+ "^.+\\.tsx?$": "ts-jest",
8
+ },
9
+ };
10
+
11
+ config.globals = {
12
+ "ts-jest": {
13
+ tsconfig: "<rootDir>/test/tsconfig.json",
14
+ },
15
+ };
16
+
17
+ export default config;
@@ -12,7 +12,7 @@
12
12
  "clean": "rimraf dist && rimraf index.js && rimraf index.d.ts",
13
13
  "build": "tsc -p .",
14
14
  "start": "npm run build -- -w",
15
- "test": "lab --typescript"
15
+ "test": "jest --config jest.config.ts"
16
16
  },
17
17
  "files": [
18
18
  "index.js",
@@ -22,11 +22,14 @@
22
22
  "access": "public"
23
23
  },
24
24
  "devDependencies": {
25
- "@hapi/code": "^9.0.0",
26
- "@hapi/lab": "^25.0.1",
25
+ "@types/jest": "^27.5.1",
26
+ "@types/node": "^16.11.36",
27
+ "jest": "^28.1.0",
27
28
  "rimraf": "^3.0.2",
28
29
  "rollup": "^2.75.0",
29
30
  "rollup-plugin-dts": "^4.2.2",
31
+ "ts-jest": "^28.0.3",
32
+ "ts-node": "^10.8.0",
30
33
  "typescript": "^4.6.4"
31
34
  },
32
35
  "author": "<author-name>",
@@ -1,19 +1,10 @@
1
- import * as Lab from "@hapi/lab";
2
- import { expect } from "@hapi/code";
3
1
  import { someFunction } from "../src";
4
2
 
5
- // Hapi Lab init code
6
- const lab = Lab.script();
7
- const { describe, it, before } = lab;
8
- export { lab };
9
-
10
3
  describe("Service", () => {
11
- before(() => {});
12
-
13
4
  it("should return the konami cheatcode", () => {
14
5
  const result = someFunction();
15
6
  const expectedResult = "Up, Up, Down, Down, Left, Right, Left, Right, B, A";
16
7
 
17
- expect(result).to.equal(expectedResult);
8
+ expect(result).toEqual(expectedResult);
18
9
  });
19
10
  });
@@ -0,0 +1,5 @@
1
+ {
2
+ "compilerOptions": {
3
+ "types": ["jest", "node"]
4
+ }
5
+ }