miqro 1.7.2 → 1.7.4
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/dist/cmds/test.d.ts +1 -1
- package/dist/cmds/test.js +7 -64
- package/package.json +3 -3
package/dist/cmds/test.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const main: () =>
|
|
1
|
+
export declare const main: () => void;
|
package/dist/cmds/test.js
CHANGED
|
@@ -1,72 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.main = void 0;
|
|
4
|
-
const path_1 = require("path");
|
|
5
4
|
const utils_1 = require("../utils");
|
|
6
5
|
const test_1 = require("@miqro/test");
|
|
7
|
-
const
|
|
8
|
-
const main =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
flags: {
|
|
12
|
-
i: {
|
|
13
|
-
description: "isolate default",
|
|
14
|
-
hasValue: false
|
|
15
|
-
},
|
|
16
|
-
["isolate-default"]: {
|
|
17
|
-
description: "isolate default",
|
|
18
|
-
hasValue: false
|
|
19
|
-
},
|
|
20
|
-
n: {
|
|
21
|
-
description: "test name",
|
|
22
|
-
hasValue: true
|
|
23
|
-
},
|
|
24
|
-
["exact"]: {
|
|
25
|
-
description: "use exact for test name matching",
|
|
26
|
-
hasValue: false
|
|
27
|
-
},
|
|
28
|
-
["disable-loging"]: {
|
|
29
|
-
description: "disable logging",
|
|
30
|
-
hasValue: false
|
|
31
|
-
},
|
|
32
|
-
["disable-isolate"]: {
|
|
33
|
-
description: "disable isolation",
|
|
34
|
-
hasValue: false
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
// console.dir(args);
|
|
39
|
-
if (args.files.length === 0) {
|
|
40
|
-
throw new Error(`bad arguments`);
|
|
6
|
+
const core_1 = require("@miqro/core");
|
|
7
|
+
const main = () => {
|
|
8
|
+
if (process.argv.length <= 3) {
|
|
9
|
+
throw new Error(`invalid number of args\nusage: npx miqro test <test/*.test.js> [...args]`);
|
|
41
10
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const isolateDefault = args.flags.i !== undefined || args.flags["isolate-default"] !== undefined ? true : false;
|
|
46
|
-
const disableIsolate = args.flags["disable-isolate"] !== undefined ? true : false;
|
|
47
|
-
const disableLogging = args.flags["disable-logging"] !== undefined ? true : false;
|
|
48
|
-
// console.dir(args);
|
|
49
|
-
// console.dir(process.argv);
|
|
50
|
-
// console.log(disableIsolate + " disableIsolate");
|
|
51
|
-
const ret = await (0, test_1.runTestModules)(modules, typeof name === "string" && name.toLowerCase() === "all" ? undefined : name, console, exact, disableIsolate, disableLogging, isolateDefault);
|
|
52
|
-
const took = Date.now() - startMS;
|
|
53
|
-
if (!disableLogging) {
|
|
54
|
-
ret.failed.forEach(e => {
|
|
55
|
-
logger.log("");
|
|
56
|
-
logger.log("");
|
|
57
|
-
logger.error("\x1b[31m%s\x1b[0m", e.fullName);
|
|
58
|
-
logger.error(e.error);
|
|
59
|
-
logger.log("");
|
|
60
|
-
logger.log("");
|
|
61
|
-
});
|
|
62
|
-
logger.log("");
|
|
63
|
-
logger.log("");
|
|
64
|
-
logger.log(ret.passed + " tests pased");
|
|
65
|
-
logger.log(ret.failed.length + " failed");
|
|
66
|
-
logger.log("took " + took + "ms");
|
|
67
|
-
logger.log("");
|
|
68
|
-
logger.log("");
|
|
69
|
-
}
|
|
70
|
-
process.exit(ret.failed.length > 0 ? 1 : 0);
|
|
11
|
+
(0, core_1.loadConfig)();
|
|
12
|
+
//execSync(`npx @miqro/test ${process.argv.slice(3).join(" ")}`);
|
|
13
|
+
(0, utils_1.execSync)(`${process.argv[0]} ${(0, test_1.mainPath)()} ${process.argv.slice(3).join(" ")}`);
|
|
71
14
|
};
|
|
72
15
|
exports.main = main;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "miqro",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"author": "claukers",
|
|
18
18
|
"license": "ISC",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@miqro/core": "^1.5.
|
|
20
|
+
"@miqro/core": "^1.5.2",
|
|
21
21
|
"@miqro/runner": "^1.2.2",
|
|
22
|
-
"@miqro/test": "^0.0.
|
|
22
|
+
"@miqro/test": "^0.0.6",
|
|
23
23
|
"deep-diff": "1.0.2"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|