Paul 5 years ago
parent
commit
931dc023bc
4 changed files with 2985 additions and 1 deletions
  1. 6
    0
      __test__/utils_test.ts
  2. 7
    0
      jest.config.js
  3. 7
    1
      package.json
  4. 2965
    0
      yarn.lock

+ 6
- 0
__test__/utils_test.ts View File

@@ -0,0 +1,6 @@
1
+import { Utils } from '../src/utils';
2
+
3
+test('object assignment', () => {
4
+  const v = Utils.crc32('/v1/session/init');
5
+  console.log(v);
6
+});

+ 7
- 0
jest.config.js View File

@@ -0,0 +1,7 @@
1
+module.exports = {
2
+  transform: {
3
+    '^.+\\.tsx?$': 'ts-jest',
4
+  },
5
+  testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$',
6
+  moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
7
+};

+ 7
- 1
package.json View File

@@ -4,11 +4,17 @@
4 4
   "description": "",
5 5
   "main": "index.js",
6 6
   "scripts": {
7
-    "test": "echo \"Error: no test specified\" && exit 1"
7
+    "test": "jest"
8 8
   },
9 9
   "author": "",
10 10
   "license": "ISC",
11 11
   "dependencies": {
12 12
     "crypto-js": "^3.1.9-1"
13
+  },
14
+  "devDependencies": {
15
+    "@types/jest": "^24.0.11",
16
+    "jest": "^24.5.0",
17
+    "ts-jest": "^24.0.0",
18
+    "typescript": "^3.3.4000"
13 19
   }
14 20
 }

+ 2965
- 0
yarn.lock
File diff suppressed because it is too large
View File