skeletest 0.1.1 → 0.1.2
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/README.md +148 -0
- package/lib/index.js +4 -2
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,2 +1,150 @@
|
|
|
1
1
|
# skeletest
|
|
2
|
+
|
|
2
3
|
test skeleton creator
|
|
4
|
+
|
|
5
|
+
## todo
|
|
6
|
+
|
|
7
|
+
- add "ignoreFiles" option in .skeletest.json
|
|
8
|
+
|
|
9
|
+
## help
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
skeletest -h
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Output:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
C:\git\github\skeletest> skeletest -h
|
|
19
|
+
Usage: index [options]
|
|
20
|
+
|
|
21
|
+
Create test skeleton.
|
|
22
|
+
Use .skeletest.json config file to override default settings.
|
|
23
|
+
|
|
24
|
+
Options:
|
|
25
|
+
-V, --version output the version number
|
|
26
|
+
-f, --fix Fix missing test files (default: false)
|
|
27
|
+
-c, --config <config> Alternative config file (must be .json) (default: ".skeletest.json")
|
|
28
|
+
-h, --help display help for command
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## run skeletest check
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
skeletest
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Output:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
C:\git\github\skeletest> skeletest
|
|
41
|
+
|
|
42
|
+
Use .skeletest.json config file to override default settings.
|
|
43
|
+
|
|
44
|
+
Wrong test files:
|
|
45
|
+
┌───┬────────────────────────────┬──────────────────────────────────┐
|
|
46
|
+
│ # │ File │ Path │
|
|
47
|
+
├───┼────────────────────────────┼──────────────────────────────────┤
|
|
48
|
+
│ 1 │ check.folder.spec.ts │ C:\git\github\skeletest\test\bla │
|
|
49
|
+
│ 2 │ check.folder.spec.ts │ C:\git\github\skeletest\test │
|
|
50
|
+
│ 3 │ get.table.of.files.spec.ts │ C:\git\github\skeletest\test │
|
|
51
|
+
└───┴────────────────────────────┴──────────────────────────────────┘
|
|
52
|
+
|
|
53
|
+
Missing test files:
|
|
54
|
+
┌────┬─────────────────────────────────────┬────────────────────────────────────────┐
|
|
55
|
+
│ # │ File │ Path │
|
|
56
|
+
├────┼─────────────────────────────────────┼────────────────────────────────────────┤
|
|
57
|
+
│ 1 │ check.folder.spec.ts │ C:\git\github\skeletest\test\functions │
|
|
58
|
+
│ 2 │ convert.files.to.objects.spec.ts │ C:\git\github\skeletest\test\functions │
|
|
59
|
+
│ 3 │ fix.extension.spec.ts │ C:\git\github\skeletest\test\functions │
|
|
60
|
+
│ 4 │ get.config.spec.ts │ C:\git\github\skeletest\test\functions │
|
|
61
|
+
│ 5 │ get.files.listing.spec.ts │ C:\git\github\skeletest\test\functions │
|
|
62
|
+
│ 6 │ get.table.from.file.objects.spec.ts │ C:\git\github\skeletest\test\functions │
|
|
63
|
+
│ 7 │ get.table.of.files.spec.ts │ C:\git\github\skeletest\test\functions │
|
|
64
|
+
│ 8 │ get.timestamp.spec.ts │ C:\git\github\skeletest\test\functions │
|
|
65
|
+
│ 9 │ index.spec.ts │ C:\git\github\skeletest\test │
|
|
66
|
+
│ 10 │ skeleton.spec.ts │ C:\git\github\skeletest\test │
|
|
67
|
+
└────┴─────────────────────────────────────┴────────────────────────────────────────┘
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## run skeletest check and fix
|
|
71
|
+
|
|
72
|
+
Use the -f option to have skeletest fix your test files
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
skeletest -f
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Output:
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
C:\git\github\skeletest> skeletest -f
|
|
82
|
+
|
|
83
|
+
Use .skeletest.json config file to override default settings.
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
Wrong test files:
|
|
87
|
+
┌───┬────────────────────────────┬──────────────────────────────────┐
|
|
88
|
+
│ # │ File │ Path │
|
|
89
|
+
├───┼────────────────────────────┼──────────────────────────────────┤
|
|
90
|
+
│ 1 │ check.folder.spec.ts │ C:\git\github\skeletest\test\bla │
|
|
91
|
+
│ 2 │ check.folder.spec.ts │ C:\git\github\skeletest\test │
|
|
92
|
+
│ 3 │ get.table.of.files.spec.ts │ C:\git\github\skeletest\test │
|
|
93
|
+
└───┴────────────────────────────┴──────────────────────────────────┘
|
|
94
|
+
|
|
95
|
+
Missing test files:
|
|
96
|
+
┌────┬─────────────────────────────────────┬────────────────────────────────────────┐
|
|
97
|
+
│ # │ File │ Path │
|
|
98
|
+
├────┼─────────────────────────────────────┼────────────────────────────────────────┤
|
|
99
|
+
│ 1 │ check.folder.spec.ts │ C:\git\github\skeletest\test\functions │
|
|
100
|
+
│ 2 │ convert.files.to.objects.spec.ts │ C:\git\github\skeletest\test\functions │
|
|
101
|
+
│ 3 │ fix.extension.spec.ts │ C:\git\github\skeletest\test\functions │
|
|
102
|
+
│ 4 │ get.config.spec.ts │ C:\git\github\skeletest\test\functions │
|
|
103
|
+
│ 5 │ get.files.listing.spec.ts │ C:\git\github\skeletest\test\functions │
|
|
104
|
+
│ 6 │ get.table.from.file.objects.spec.ts │ C:\git\github\skeletest\test\functions │
|
|
105
|
+
│ 7 │ get.table.of.files.spec.ts │ C:\git\github\skeletest\test\functions │
|
|
106
|
+
│ 8 │ get.timestamp.spec.ts │ C:\git\github\skeletest\test\functions │
|
|
107
|
+
│ 9 │ index.spec.ts │ C:\git\github\skeletest\test │
|
|
108
|
+
│ 10 │ skeleton.spec.ts │ C:\git\github\skeletest\test │
|
|
109
|
+
└────┴─────────────────────────────────────┴────────────────────────────────────────┘
|
|
110
|
+
|
|
111
|
+
Fix is set to true. Fixing what I can...
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
Creating all missing folders...
|
|
115
|
+
- Checking C:\git\github\skeletest\test\functions ...
|
|
116
|
+
- Checking C:\git\github\skeletest\test ...
|
|
117
|
+
Done.
|
|
118
|
+
|
|
119
|
+
Files I can move:
|
|
120
|
+
┌───┬────────────────────────────┬──────────────────────────────┬────────────────────────────────────────┐
|
|
121
|
+
│ # │ File │ Path │ New Path │
|
|
122
|
+
├───┼────────────────────────────┼──────────────────────────────┼────────────────────────────────────────┤
|
|
123
|
+
│ 1 │ get.table.of.files.spec.ts │ C:\git\github\skeletest\test │ C:\git\github\skeletest\test\functions │
|
|
124
|
+
└───┴────────────────────────────┴──────────────────────────────┴────────────────────────────────────────┘
|
|
125
|
+
|
|
126
|
+
Moving files...
|
|
127
|
+
- Moving get.table.of.files.spec.ts from C:\git\github\skeletest\test to C:\git\github\skeletest\test\functions ...
|
|
128
|
+
Done.
|
|
129
|
+
|
|
130
|
+
Creating files...
|
|
131
|
+
- Creating C:\git\github\skeletest\test\functions\check.folder.spec.ts ...
|
|
132
|
+
- Creating C:\git\github\skeletest\test\functions\convert.files.to.objects.spec.ts ...
|
|
133
|
+
- Creating C:\git\github\skeletest\test\functions\fix.extension.spec.ts ...
|
|
134
|
+
- Creating C:\git\github\skeletest\test\functions\get.config.spec.ts ...
|
|
135
|
+
- Creating C:\git\github\skeletest\test\functions\get.files.listing.spec.ts ...
|
|
136
|
+
- Creating C:\git\github\skeletest\test\functions\get.table.from.file.objects.spec.ts ...
|
|
137
|
+
- Creating C:\git\github\skeletest\test\functions\get.table.of.files.spec.ts ...
|
|
138
|
+
- Creating C:\git\github\skeletest\test\functions\get.timestamp.spec.ts ...
|
|
139
|
+
- Creating C:\git\github\skeletest\test\index.spec.ts ...
|
|
140
|
+
- Creating C:\git\github\skeletest\test\skeleton.spec.ts ...
|
|
141
|
+
Done.
|
|
142
|
+
|
|
143
|
+
Files I could NOT move:
|
|
144
|
+
┌───┬──────────────────────┬──────────────────────────────────┬────────────────────────────────────────┐
|
|
145
|
+
│ # │ File │ Path │ New Path │
|
|
146
|
+
├───┼──────────────────────┼──────────────────────────────────┼────────────────────────────────────────┤
|
|
147
|
+
│ 1 │ check.folder.spec.ts │ C:\git\github\skeletest\test\bla │ C:\git\github\skeletest\test\functions │
|
|
148
|
+
│ 2 │ check.folder.spec.ts │ C:\git\github\skeletest\test │ C:\git\github\skeletest\test\functions │
|
|
149
|
+
└───┴──────────────────────┴──────────────────────────────────┴────────────────────────────────────────┘
|
|
150
|
+
```
|
package/lib/index.js
CHANGED
|
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
};
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
const commander_1 = require("commander");
|
|
8
|
-
console.log('\nUse .skeletest.json config file to override default settings.\n');
|
|
9
8
|
const commander = new commander_1.Command();
|
|
10
9
|
const packageJson = require('../package.json');
|
|
11
10
|
commander
|
|
@@ -14,6 +13,9 @@ commander
|
|
|
14
13
|
.option('-f, --fix', 'Fix missing test files', false)
|
|
15
14
|
.option('-c, --config <config>', 'Alternative config file (must be .json)', '.skeletest.json')
|
|
16
15
|
.parse(process.argv);
|
|
16
|
+
const options = commander.opts();
|
|
17
|
+
if (!(options === null || options === void 0 ? void 0 : options.help))
|
|
18
|
+
console.log('\nUse .skeletest.json config file to override default settings.\n');
|
|
17
19
|
const skeleton_1 = __importDefault(require("./skeleton"));
|
|
18
|
-
skeleton_1.default.run(
|
|
20
|
+
skeleton_1.default.run(options);
|
|
19
21
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,YAAY,CAAC;;;;;AAYb,yCAAkC;AAElC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,YAAY,CAAC;;;;;AAYb,yCAAkC;AAElC,MAAM,SAAS,GAAQ,IAAI,mBAAO,EAAE,CAAC;AACrC,MAAM,WAAW,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAE/C,SAAS;KACP,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC;KAC5B,WAAW,CAAC,sFAAsF,CAAC;KACnG,MAAM,CAAC,WAAW,EAAE,wBAAwB,EAAE,KAAK,CAAC;KACpD,MAAM,CAAC,uBAAuB,EAAE,yCAAyC,EAAE,iBAAiB,CAAC;KAC7F,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAEtB,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,EAAE,CAAC;AACjC,IAAI,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,CAAA;IAAE,OAAO,CAAC,GAAG,CAAC,mEAAmE,CAAC,CAAC;AAErG,0DAAkC;AAElC,kBAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC"}
|