@locustjs/test 1.3.1 → 1.4.0

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@locustjs/test",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "description": "This library provides a simple test runner.",
5
5
  "main": "index.cjs.js",
6
6
  "module": "index.esm.js",
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "homepage": "https://github.com/ironcodev/locustjs-test#readme",
25
25
  "dependencies": {
26
- "@locustjs/base": "^2.1.0",
26
+ "@locustjs/base": "^4.0.0",
27
27
  "@locustjs/exception": "^2.0.2"
28
28
  },
29
29
  "devDependencies": {
package/tests/index.js CHANGED
@@ -66,7 +66,7 @@ const tests = [
66
66
  },
67
67
  ],
68
68
  [
69
- "Test 3: empty object",
69
+ "Test 5: empty object",
70
70
  function (expect) {
71
71
  const n = {};
72
72
 
@@ -80,7 +80,7 @@ const tests = [
80
80
  },
81
81
  ],
82
82
  [
83
- "Test 4: object",
83
+ "Test 6: object",
84
84
  function (expect) {
85
85
  const n = {a:10};
86
86
 
@@ -94,7 +94,15 @@ const tests = [
94
94
  },
95
95
  ],
96
96
  [
97
- "Test 4: class",
97
+ "Test 7: error",
98
+ function (expect) {
99
+ const x = 10;
100
+
101
+ expect(x).toBeGreaterThan(20);
102
+ },
103
+ ],
104
+ [
105
+ "Test 8: class",
98
106
  function (expect) {
99
107
  const x = new Bar();
100
108
 
@@ -109,8 +117,4 @@ const tests = [
109
117
  ]
110
118
  ];
111
119
 
112
- const runner = new TestRunner();
113
-
114
- runner.run(tests).then((result) => {
115
- runner.report(result.failed > 0);
116
- });
120
+ TestRunner.start(tests);