@adonisjs/assembler 5.5.0-0 → 5.5.1-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/build/ace-manifest.json +12 -22
- package/build/commands/Test.d.ts +13 -3
- package/build/commands/Test.js +10 -24
- package/build/src/Contracts/index.d.ts +1 -3
- package/build/src/Test/process.js +3 -1
- package/package.json +1 -1
package/build/ace-manifest.json
CHANGED
|
@@ -360,7 +360,15 @@
|
|
|
360
360
|
"commandPath": "./commands/Test",
|
|
361
361
|
"commandName": "test",
|
|
362
362
|
"description": "Run AdonisJS tests",
|
|
363
|
-
"args": [
|
|
363
|
+
"args": [
|
|
364
|
+
{
|
|
365
|
+
"type": "spread",
|
|
366
|
+
"propertyName": "suites",
|
|
367
|
+
"name": "suites",
|
|
368
|
+
"required": false,
|
|
369
|
+
"description": "Run tests for only the specified suites"
|
|
370
|
+
}
|
|
371
|
+
],
|
|
364
372
|
"aliases": [],
|
|
365
373
|
"flags": [
|
|
366
374
|
{
|
|
@@ -387,37 +395,19 @@
|
|
|
387
395
|
"name": "tags",
|
|
388
396
|
"propertyName": "tags",
|
|
389
397
|
"type": "array",
|
|
390
|
-
"description": "
|
|
398
|
+
"description": "Filter tests by tags"
|
|
391
399
|
},
|
|
392
400
|
{
|
|
393
401
|
"name": "ignore-tags",
|
|
394
402
|
"propertyName": "ignoreTags",
|
|
395
403
|
"type": "array",
|
|
396
|
-
"description": "
|
|
404
|
+
"description": "Filter tests by ignoring tags"
|
|
397
405
|
},
|
|
398
406
|
{
|
|
399
407
|
"name": "timeout",
|
|
400
408
|
"propertyName": "timeout",
|
|
401
409
|
"type": "number",
|
|
402
|
-
"description": "
|
|
403
|
-
},
|
|
404
|
-
{
|
|
405
|
-
"name": "suites",
|
|
406
|
-
"propertyName": "suites",
|
|
407
|
-
"type": "array",
|
|
408
|
-
"description": "Run tests for only the specified suites"
|
|
409
|
-
},
|
|
410
|
-
{
|
|
411
|
-
"name": "groups",
|
|
412
|
-
"propertyName": "groups",
|
|
413
|
-
"type": "array",
|
|
414
|
-
"description": "Run tests for only the specified groups"
|
|
415
|
-
},
|
|
416
|
-
{
|
|
417
|
-
"name": "tests",
|
|
418
|
-
"propertyName": "tests",
|
|
419
|
-
"type": "array",
|
|
420
|
-
"description": "Run tests with the specified titles"
|
|
410
|
+
"description": "Customize tests timeout"
|
|
421
411
|
},
|
|
422
412
|
{
|
|
423
413
|
"name": "force-exit",
|
package/build/commands/Test.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export default class Test extends BaseCommand {
|
|
|
8
8
|
static settings: {
|
|
9
9
|
stayAlive: boolean;
|
|
10
10
|
};
|
|
11
|
+
suites: string[];
|
|
11
12
|
/**
|
|
12
13
|
* Allows watching for file changes
|
|
13
14
|
*/
|
|
@@ -20,12 +21,21 @@ export default class Test extends BaseCommand {
|
|
|
20
21
|
* Arguments to pass to the `node` binary
|
|
21
22
|
*/
|
|
22
23
|
nodeArgs: string[];
|
|
24
|
+
/**
|
|
25
|
+
* Filter by tags
|
|
26
|
+
*/
|
|
23
27
|
tags: string[];
|
|
28
|
+
/**
|
|
29
|
+
* Filter by tags
|
|
30
|
+
*/
|
|
24
31
|
ignoreTags: string[];
|
|
32
|
+
/**
|
|
33
|
+
* Customize tests timeout
|
|
34
|
+
*/
|
|
25
35
|
timeout: number;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Force exit the tests runner
|
|
38
|
+
*/
|
|
29
39
|
forceExit: boolean;
|
|
30
40
|
/**
|
|
31
41
|
* Convert command flags to test filters
|
package/build/commands/Test.js
CHANGED
|
@@ -63,18 +63,12 @@ class Test extends standalone_1.BaseCommand {
|
|
|
63
63
|
if (this.timeout !== undefined) {
|
|
64
64
|
filters['--timeout'] = this.timeout;
|
|
65
65
|
}
|
|
66
|
-
if (this.tests) {
|
|
67
|
-
filters['--tests'] = this.tests;
|
|
68
|
-
}
|
|
69
|
-
if (this.groups) {
|
|
70
|
-
filters['--groups'] = this.groups;
|
|
71
|
-
}
|
|
72
|
-
if (this.suites) {
|
|
73
|
-
filters['--suites'] = this.suites;
|
|
74
|
-
}
|
|
75
66
|
if (this.tags) {
|
|
76
67
|
filters['--tags'] = this.tags;
|
|
77
68
|
}
|
|
69
|
+
if (this.suites) {
|
|
70
|
+
filters._ = this.suites;
|
|
71
|
+
}
|
|
78
72
|
if (this.ignoreTags) {
|
|
79
73
|
filters['--ignore-tags'] = this.ignoreTags;
|
|
80
74
|
}
|
|
@@ -101,6 +95,10 @@ Test.description = 'Run AdonisJS tests';
|
|
|
101
95
|
Test.settings = {
|
|
102
96
|
stayAlive: true,
|
|
103
97
|
};
|
|
98
|
+
__decorate([
|
|
99
|
+
standalone_1.args.spread({ description: 'Run tests for only the specified suites', required: false }),
|
|
100
|
+
__metadata("design:type", Array)
|
|
101
|
+
], Test.prototype, "suites", void 0);
|
|
104
102
|
__decorate([
|
|
105
103
|
standalone_1.flags.boolean({
|
|
106
104
|
description: 'Watch for file changes and re-run tests on file change',
|
|
@@ -120,29 +118,17 @@ __decorate([
|
|
|
120
118
|
__metadata("design:type", Array)
|
|
121
119
|
], Test.prototype, "nodeArgs", void 0);
|
|
122
120
|
__decorate([
|
|
123
|
-
standalone_1.flags.array({ description: '
|
|
121
|
+
standalone_1.flags.array({ description: 'Filter tests by tags' }),
|
|
124
122
|
__metadata("design:type", Array)
|
|
125
123
|
], Test.prototype, "tags", void 0);
|
|
126
124
|
__decorate([
|
|
127
|
-
standalone_1.flags.array({ description: '
|
|
125
|
+
standalone_1.flags.array({ description: 'Filter tests by ignoring tags' }),
|
|
128
126
|
__metadata("design:type", Array)
|
|
129
127
|
], Test.prototype, "ignoreTags", void 0);
|
|
130
128
|
__decorate([
|
|
131
|
-
standalone_1.flags.number({ description: '
|
|
129
|
+
standalone_1.flags.number({ description: 'Customize tests timeout' }),
|
|
132
130
|
__metadata("design:type", Number)
|
|
133
131
|
], Test.prototype, "timeout", void 0);
|
|
134
|
-
__decorate([
|
|
135
|
-
standalone_1.flags.array({ description: 'Run tests for only the specified suites' }),
|
|
136
|
-
__metadata("design:type", Array)
|
|
137
|
-
], Test.prototype, "suites", void 0);
|
|
138
|
-
__decorate([
|
|
139
|
-
standalone_1.flags.array({ description: 'Run tests for only the specified groups' }),
|
|
140
|
-
__metadata("design:type", Array)
|
|
141
|
-
], Test.prototype, "groups", void 0);
|
|
142
|
-
__decorate([
|
|
143
|
-
standalone_1.flags.array({ description: 'Run tests with the specified titles' }),
|
|
144
|
-
__metadata("design:type", Array)
|
|
145
|
-
], Test.prototype, "tests", void 0);
|
|
146
132
|
__decorate([
|
|
147
133
|
standalone_1.flags.boolean({ description: 'Force exit the tests runner process' }),
|
|
148
134
|
__metadata("design:type", Boolean)
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
export declare type JapaFlags = Partial<{
|
|
2
|
-
'
|
|
2
|
+
'_': string[];
|
|
3
3
|
'--tags': string[];
|
|
4
|
-
'--groups': string[];
|
|
5
4
|
'--ignore-tags': string[];
|
|
6
5
|
'--files': string[];
|
|
7
6
|
'--timeout': number;
|
|
8
|
-
'--suites': string[];
|
|
9
7
|
'--force-exit': boolean;
|
|
10
8
|
}>;
|
|
@@ -35,7 +35,9 @@ class TestProcess {
|
|
|
35
35
|
this.logger.info('running tests...');
|
|
36
36
|
const filters = Object.keys(this.filters).reduce((result, filter) => {
|
|
37
37
|
const value = this.filters[filter];
|
|
38
|
-
|
|
38
|
+
if (filter !== '_') {
|
|
39
|
+
result.push(filter);
|
|
40
|
+
}
|
|
39
41
|
if (Array.isArray(value)) {
|
|
40
42
|
result.push(...value);
|
|
41
43
|
}
|