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: snyk:
stage: security stage: security
script: script:
- npmci npm prepare
- npmci command npm install -g snyk - npmci command npm install -g snyk
- npmci command npm install --ignore-scripts - npmci command npm install --ignore-scripts
- npmci command snyk test - npmci command snyk test
@ -36,21 +37,11 @@ snyk:
# ==================== # ====================
# test stage # 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: testLTS:
stage: test stage: test
script: script:
- npmci npm prepare
- npmci node install lts - npmci node install lts
- npmci npm install - npmci npm install
- npmci npm test - npmci npm test
@ -62,6 +53,7 @@ testLTS:
testSTABLE: testSTABLE:
stage: test stage: test
script: script:
- npmci npm prepare
- npmci node install stable - npmci node install stable
- npmci npm install - npmci npm install
- npmci npm test - npmci npm test
@ -118,6 +110,7 @@ pages:
stage: metadata stage: metadata
script: script:
- npmci command npm install -g typedoc typescript - npmci command npm install -g typedoc typescript
- npmci npm prepare
- npmci npm install - npmci npm install
- npmci command typedoc --module "commonjs" --target "ES2016" --out public/ ts/ - npmci command typedoc --module "commonjs" --target "ES2016" --out public/ ts/
tags: tags:
@ -130,13 +123,3 @@ pages:
paths: paths:
- public - public
allow_failure: true 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", "name": "@gitzone/tstest",
"version": "1.0.16", "version": "1.0.18",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
@ -15,9 +15,9 @@
} }
}, },
"@gitzone/tsbuild": { "@gitzone/tsbuild": {
"version": "2.1.2", "version": "2.1.3",
"resolved": "https://registry.npmjs.org/@gitzone/tsbuild/-/tsbuild-2.1.2.tgz", "resolved": "https://registry.npmjs.org/@gitzone/tsbuild/-/tsbuild-2.1.3.tgz",
"integrity": "sha512-YglaSgsvnrrJG92BlvvIJ0xBzOmHetZHit80i4IKLndvI+EbhE4mPV0Nh3lF+M89P06gnmcUvx8y3IO8wVK65A==", "integrity": "sha512-DUPTJnGfsoS1kofEisolPbPuznY9CaGQUwloZfqctV2lYEpu+oOnXHs7H4Hc8+Obsf8Aun1z0KILAXpNo5K6TA==",
"requires": { "requires": {
"@pushrocks/smartcli": "^3.0.6", "@pushrocks/smartcli": "^3.0.6",
"@pushrocks/smartfile": "^6.0.11", "@pushrocks/smartfile": "^6.0.11",
@ -25,19 +25,12 @@
"@pushrocks/smartpath": "^4.0.1", "@pushrocks/smartpath": "^4.0.1",
"@pushrocks/smartpromise": "^2.0.5", "@pushrocks/smartpromise": "^2.0.5",
"typescript": "^3.2.1" "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": { "@gitzone/tsrun": {
"version": "1.1.16", "version": "1.1.17",
"resolved": "https://registry.npmjs.org/@gitzone/tsrun/-/tsrun-1.1.16.tgz", "resolved": "https://registry.npmjs.org/@gitzone/tsrun/-/tsrun-1.1.17.tgz",
"integrity": "sha512-OESQjPolqQCy4O5jC8ZsN8dU4Z47YIj4gI4CxDrge7dQoXZuqvkayLjuVfyiI3n2Bjj+wVMHGHqE0t54fE5YhA==", "integrity": "sha512-FuzbVPJ9/67QeKSAD0BxgZ80Q0zEAN68x5oZS6G21t9ffM8tnNhIlghzeYnoorJqUnQtMIldFlW0t/dc8B4l9g==",
"requires": { "requires": {
"@gitzone/tsbuild": "^2.0.22", "@gitzone/tsbuild": "^2.0.22",
"@pushrocks/smartfile": "^6.0.6", "@pushrocks/smartfile": "^6.0.6",
@ -219,7 +212,7 @@
}, },
"@types/chai-string": { "@types/chai-string": {
"version": "1.4.1", "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==", "integrity": "sha512-aRNMs6TKgjgPlCHwDfq/YNy5VtRR2hJ4AUWByddrT0TRVVD8eX4MiHW6/iHvmQHRlVuuPZcwnTUE7b4yFt7bEA==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -956,7 +949,7 @@
}, },
"pretty-bytes": { "pretty-bytes": {
"version": "4.0.2", "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=", "integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=",
"dev": true "dev": true
}, },
@ -1177,9 +1170,9 @@
"dev": true "dev": true
}, },
"typescript": { "typescript": {
"version": "3.0.1", "version": "3.2.1",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.0.1.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.1.tgz",
"integrity": "sha512-zQIMOmC+372pC/CCVLqnQ0zSBiY7HHodU7mpQdjiZddek4GMj31I3dUJ7gAs9o65X7mnRma6OokOkc6f9jjfBg==" "integrity": "sha512-jw7P2z/h6aPT4AENXDGjcfHTu5CSqzsbZc6YlUIebTyBAq8XaKp78x7VcSh30xwSCcsu5irZkYZUSFP1MrAMbg=="
}, },
"typings-global": { "typings-global": {
"version": "1.0.28", "version": "1.0.28",

View File

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

View File

@ -14,7 +14,9 @@ export class TapCombinator {
} }
evaluate() { 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 let failGlobal = false; // determine wether tstest should fail
for (const tapParser of this.tapParserStore) { for (const tapParser of this.tapParserStore) {

View File

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

View File

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