Compare commits

...

4 Commits

Author SHA1 Message Date
5afe6e6981 1.0.18 2018-12-06 01:03:49 +01:00
5d071d0299 fix(core): update 2018-12-06 01:03:48 +01:00
180bfcb353 1.0.17 2018-12-06 00:56:36 +01:00
3161e6b4eb fix(core): update 2018-12-06 00:56:36 +01:00
7 changed files with 51 additions and 72 deletions

View File

@ -26,6 +26,7 @@ mirror:
snyk:
stage: security
script:
- npmci npm prepare
- npmci command npm install -g snyk
- npmci command npm install --ignore-scripts
- npmci command snyk test
@ -36,21 +37,11 @@ snyk:
# ====================
# test stage
# ====================
testLEGACY:
stage: test
script:
- npmci node install legacy
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
- notpriv
allow_failure: true
testLTS:
stage: test
script:
- npmci npm prepare
- npmci node install lts
- npmci npm install
- npmci npm test
@ -62,6 +53,7 @@ testLTS:
testSTABLE:
stage: test
script:
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci npm test
@ -118,6 +110,7 @@ pages:
stage: metadata
script:
- npmci command npm install -g typedoc typescript
- npmci npm prepare
- npmci npm install
- npmci command typedoc --module "commonjs" --target "ES2016" --out public/ ts/
tags:
@ -130,13 +123,3 @@ pages:
paths:
- public
allow_failure: true
windowsCompatibility:
image: stefanscherer/node-windows:10-build-tools
stage: metadata
script:
- npm install & npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- windows
allow_failure: true

31
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@gitzone/tstest",
"version": "1.0.16",
"version": "1.0.18",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -15,9 +15,9 @@
}
},
"@gitzone/tsbuild": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/@gitzone/tsbuild/-/tsbuild-2.1.2.tgz",
"integrity": "sha512-YglaSgsvnrrJG92BlvvIJ0xBzOmHetZHit80i4IKLndvI+EbhE4mPV0Nh3lF+M89P06gnmcUvx8y3IO8wVK65A==",
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/@gitzone/tsbuild/-/tsbuild-2.1.3.tgz",
"integrity": "sha512-DUPTJnGfsoS1kofEisolPbPuznY9CaGQUwloZfqctV2lYEpu+oOnXHs7H4Hc8+Obsf8Aun1z0KILAXpNo5K6TA==",
"requires": {
"@pushrocks/smartcli": "^3.0.6",
"@pushrocks/smartfile": "^6.0.11",
@ -25,19 +25,12 @@
"@pushrocks/smartpath": "^4.0.1",
"@pushrocks/smartpromise": "^2.0.5",
"typescript": "^3.2.1"
},
"dependencies": {
"typescript": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.1.tgz",
"integrity": "sha512-jw7P2z/h6aPT4AENXDGjcfHTu5CSqzsbZc6YlUIebTyBAq8XaKp78x7VcSh30xwSCcsu5irZkYZUSFP1MrAMbg=="
}
}
},
"@gitzone/tsrun": {
"version": "1.1.16",
"resolved": "https://registry.npmjs.org/@gitzone/tsrun/-/tsrun-1.1.16.tgz",
"integrity": "sha512-OESQjPolqQCy4O5jC8ZsN8dU4Z47YIj4gI4CxDrge7dQoXZuqvkayLjuVfyiI3n2Bjj+wVMHGHqE0t54fE5YhA==",
"version": "1.1.17",
"resolved": "https://registry.npmjs.org/@gitzone/tsrun/-/tsrun-1.1.17.tgz",
"integrity": "sha512-FuzbVPJ9/67QeKSAD0BxgZ80Q0zEAN68x5oZS6G21t9ffM8tnNhIlghzeYnoorJqUnQtMIldFlW0t/dc8B4l9g==",
"requires": {
"@gitzone/tsbuild": "^2.0.22",
"@pushrocks/smartfile": "^6.0.6",
@ -219,7 +212,7 @@
},
"@types/chai-string": {
"version": "1.4.1",
"resolved": "http://registry.npmjs.org/@types/chai-string/-/chai-string-1.4.1.tgz",
"resolved": "https://registry.npmjs.org/@types/chai-string/-/chai-string-1.4.1.tgz",
"integrity": "sha512-aRNMs6TKgjgPlCHwDfq/YNy5VtRR2hJ4AUWByddrT0TRVVD8eX4MiHW6/iHvmQHRlVuuPZcwnTUE7b4yFt7bEA==",
"dev": true,
"requires": {
@ -956,7 +949,7 @@
},
"pretty-bytes": {
"version": "4.0.2",
"resolved": "http://registry.npmjs.org/pretty-bytes/-/pretty-bytes-4.0.2.tgz",
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-4.0.2.tgz",
"integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=",
"dev": true
},
@ -1177,9 +1170,9 @@
"dev": true
},
"typescript": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.0.1.tgz",
"integrity": "sha512-zQIMOmC+372pC/CCVLqnQ0zSBiY7HHodU7mpQdjiZddek4GMj31I3dUJ7gAs9o65X7mnRma6OokOkc6f9jjfBg=="
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.1.tgz",
"integrity": "sha512-jw7P2z/h6aPT4AENXDGjcfHTu5CSqzsbZc6YlUIebTyBAq8XaKp78x7VcSh30xwSCcsu5irZkYZUSFP1MrAMbg=="
},
"typings-global": {
"version": "1.0.28",

View File

@ -1,6 +1,6 @@
{
"name": "@gitzone/tstest",
"version": "1.0.16",
"version": "1.0.18",
"private": false,
"description": "a test utility to run tests that match test/**/*.ts",
"main": "dist/index.js",
@ -19,11 +19,11 @@
"build": "(tsbuild)"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.2",
"@gitzone/tsbuild": "^2.1.3",
"@pushrocks/tapbundle": "^3.0.7"
},
"dependencies": {
"@gitzone/tsrun": "^1.1.16",
"@gitzone/tsrun": "^1.1.17",
"@pushrocks/consolecolor": "^2.0.1",
"@pushrocks/smartfile": "^6.0.11",
"@pushrocks/smartlog": "^2.0.9",

View File

@ -14,7 +14,9 @@ export class TapCombinator {
}
evaluate() {
console.log(`${logPrefixes.TsTestPrefix} RESULTS FOR ${this.tapParserStore.length} TESTFILE(S):`);
console.log(
`${logPrefixes.TsTestPrefix} RESULTS FOR ${this.tapParserStore.length} TESTFILE(S):`
);
let failGlobal = false; // determine wether tstest should fail
for (const tapParser of this.tapParserStore) {

View File

@ -23,7 +23,6 @@ export class TapParser {
*/
constructor(public fileName: string) {}
private _getNewTapTestResult() {
this.activeTapTestResult = new TapTestResult(this.testStore.length + 1);
}
@ -45,10 +44,7 @@ export class TapParser {
const regexResult = this.expectedTestsRegex.exec(logLine);
this.expectedTests = parseInt(regexResult[2]);
console.log(
`${logPrefixes.TapPrefix} ${cs(
`Expecting ${this.expectedTests} tests!`,
'blue'
)}`
`${logPrefixes.TapPrefix} ${cs(`Expecting ${this.expectedTests} tests!`, 'blue')}`
);
// initiating first TapResult
@ -70,9 +66,7 @@ export class TapParser {
// test for protocol error
if (testId !== this.activeTapTestResult.id) {
console.log(
`${
logPrefixes.TapErrorPrefix
} Something is strange! Test Ids are not equal!`
`${logPrefixes.TapErrorPrefix} Something is strange! Test Ids are not equal!`
);
}
this.activeTapTestResult.setTestResult(testOk);
@ -128,9 +122,9 @@ export class TapParser {
* returns a test overview as string
*/
getTestOverviewAsString() {
let overviewString = ''
for(let test of this.testStore) {
if(overviewString !== '') {
let overviewString = '';
for (let test of this.testStore) {
if (overviewString !== '') {
overviewString += ' | ';
}
if (test.testOk) {
@ -161,29 +155,20 @@ export class TapParser {
if (this.expectedTests === this.receivedTests) {
console.log(
`${logPrefixes.TapPrefix} ${cs(
`${this.receivedTests} out of ${
this.expectedTests
} Tests completed!`,
`${this.receivedTests} out of ${this.expectedTests} Tests completed!`,
'green'
)}`
);
} else {
console.log(
`${logPrefixes.TapErrorPrefix} ${cs(
`Only ${this.receivedTests} out of ${
this.expectedTests
} completed!`,
`Only ${this.receivedTests} out of ${this.expectedTests} completed!`,
'red'
)}`
);
}
if (this.getErrorTests().length === 0) {
console.log(
`${logPrefixes.TapPrefix} ${cs(
`All tests are successfull!!!`,
'green'
)}`
);
console.log(`${logPrefixes.TapPrefix} ${cs(`All tests are successfull!!!`, 'green')}`);
} else {
console.log(
`${logPrefixes.TapPrefix} ${cs(

View File

@ -37,12 +37,14 @@ export class TsTest {
const tapParser = new TapParser(fileName);
// tsrun options
let tsrunOptions = ''
if(process.argv.includes('--web')) {
tsrunOptions += ' --web'
let tsrunOptions = '';
if (process.argv.includes('--web')) {
tsrunOptions += ' --web';
}
const execResultStreaming = await smartshellInstance.execStreamingSilent(`tsrun ${fileName}${tsrunOptions}`);
const execResultStreaming = await smartshellInstance.execStreamingSilent(
`tsrun ${fileName}${tsrunOptions}`
);
await tapParser.handleTapProcess(execResultStreaming.childProcess);
console.log(cs(`^`.repeat(16), 'cyan'));
console.log(''); // force new line

View File

@ -1,3 +1,17 @@
{
"extends": "tslint-config-standard"
"extends": ["tslint:latest", "tslint-config-prettier"],
"rules": {
"semicolon": [true, "always"],
"no-console": false,
"ordered-imports": false,
"object-literal-sort-keys": false,
"member-ordering": {
"options":{
"order": [
"static-method"
]
}
}
},
"defaultSeverity": "warning"
}