Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Commit 275ea22

Browse files
committed
:tools:generator better test names
shorter, easier on the filesystem
1 parent 00568e8 commit 275ea22

1 file changed

Lines changed: 10 additions & 11 deletions

File tree

tools/generator-polygene/test/generator_test.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -135,22 +135,21 @@ if(process.env.TEST_ALL == 'yes') {
135135

136136
function test(appType, entityStore, indexing, serialization, caching, metrics, features) {
137137
describe('polygene-generator', function () {
138-
var testName = 'generates a Gradle buildable Apache Polygene project with '
139-
+ entityStore + 'EntityStore, '
140-
+ indexing + 'Indexing, '
141-
+ serialization + 'Serialization, '
142-
+ caching + 'Caching, '
143-
+ metrics + 'Metrics';
144-
if(features) {
145-
testName += ', and ' + features;
138+
var testName = appType + ' with '
139+
+ entityStore + ' EntityStore - '
140+
+ indexing + ' Indexing - '
141+
+ serialization + ' Serialization - '
142+
+ caching + ' Caching - '
143+
+ metrics + ' Metrics';
144+
if(features && features.length > 0) {
145+
testName += ' - ' + features.toString().replace(new RegExp(',', 'g'), ' - ');
146146
}
147-
testName += '.';
148-
var testDirName = testName.replace(new RegExp('[, ]','g'), '_');
147+
var testDirName = testName.replace(new RegExp(' - ', 'g'), '_').replace(new RegExp(' ', 'g'), '_');
149148
it(testName,
150149
function () {
151150
this.timeout(30000);
152151
return helpers.run(path.join(__dirname, '../app'))
153-
.inDir(path.join(__dirname, '../build/npm-test/'+testDirName))
152+
.inDir(path.join(__dirname, '../build/npm-test/' + testDirName))
154153
.withPrompts({
155154
name: 'TestProject',
156155
packageName: 'org.apache.polygene.generator.test',

0 commit comments

Comments
 (0)