fix(core): update
This commit is contained in:
parent
180bfcb353
commit
5d071d0299
@ -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
|
|
||||||
|
@ -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) {
|
||||||
|
@ -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(
|
||||||
|
@ -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
|
||||||
|
16
tslint.json
16
tslint.json
@ -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"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user