Compare commits
72 Commits
Author | SHA1 | Date | |
---|---|---|---|
d19d3fc51e | |||
f7f1bf25f6 | |||
42fd414609 | |||
8f16f46c37 | |||
f8afb2c7f6 | |||
a3d1fbb2da | |||
0da1a1bc5b | |||
1ede0b476a | |||
1d251689bb | |||
8f1492dfbd | |||
003dc473ea | |||
e6baed5470 | |||
d9a27adb4a | |||
eabb75a9a8 | |||
deb63c1af5 | |||
7ee3969798 | |||
61eea77805 | |||
3d9685ac6f | |||
4ec56c3f0b | |||
ab33720aba | |||
5e42565567 | |||
88b7581eeb | |||
0ea621cb99 | |||
984d551bd6 | |||
4066d9b0e8 | |||
f24ff2f79e | |||
9d37fcf734 | |||
f7524179d7 | |||
19d6b52ddb | |||
cf69e5436c | |||
6bee853cd2 | |||
4aa731b531 | |||
a849f36a1b | |||
30284b770c | |||
023176258a | |||
ad2866ae0b | |||
af030ed013 | |||
940133493c | |||
e999abbba6 | |||
4ede3090af | |||
c5c295f42d | |||
4602fed130 | |||
a6ecf1d530 | |||
22703f261c | |||
289cc6c0df | |||
97d0ebffec | |||
da19d5de39 | |||
7380323186 | |||
7a6923051f | |||
0bac34dd37 | |||
e10d9eb2a7 | |||
c5596f1a8f | |||
ac0bb6f9b0 | |||
32db50ef1f | |||
a35db70155 | |||
0286312855 | |||
40cf6f72ce | |||
e6c71a1350 | |||
1c640b8545 | |||
8c4b591391 | |||
8eb270ebbc | |||
f6d47a1a67 | |||
2a41acc6e4 | |||
fb6bb85441 | |||
02dbe602b2 | |||
e17d7009d9 | |||
d22534388d | |||
e258b2d62e | |||
5afe6e6981 | |||
5d071d0299 | |||
180bfcb353 | |||
3161e6b4eb |
16
.gitignore
vendored
16
.gitignore
vendored
@ -1,6 +1,20 @@
|
|||||||
.nogit/
|
.nogit/
|
||||||
node_modules/
|
|
||||||
|
# artifacts
|
||||||
coverage/
|
coverage/
|
||||||
public/
|
public/
|
||||||
pages/
|
pages/
|
||||||
|
|
||||||
|
# installs
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# caches
|
||||||
.yarn/
|
.yarn/
|
||||||
|
.cache/
|
||||||
|
.rpt2_cache
|
||||||
|
|
||||||
|
# builds
|
||||||
|
dist/
|
||||||
|
dist_*/
|
||||||
|
|
||||||
|
# custom
|
149
.gitlab-ci.yml
149
.gitlab-ci.yml
@ -1,16 +1,16 @@
|
|||||||
# gitzone standard
|
# gitzone ci_default
|
||||||
image: hosttoday/ht-docker-node:npmci
|
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
- .npmci_cache/
|
- .npmci_cache/
|
||||||
key: "$CI_BUILD_STAGE"
|
key: '$CI_BUILD_STAGE'
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- security
|
- security
|
||||||
- test
|
- test
|
||||||
- release
|
- release
|
||||||
- metadata
|
- metadata
|
||||||
|
|
||||||
# ====================
|
# ====================
|
||||||
# security stage
|
# security stage
|
||||||
@ -18,109 +18,114 @@ stages:
|
|||||||
mirror:
|
mirror:
|
||||||
stage: security
|
stage: security
|
||||||
script:
|
script:
|
||||||
- npmci git mirror
|
- npmci git mirror
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- lossless
|
||||||
- notpriv
|
- docker
|
||||||
|
- notpriv
|
||||||
|
|
||||||
snyk:
|
auditProductionDependencies:
|
||||||
|
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
stage: security
|
stage: security
|
||||||
script:
|
script:
|
||||||
- npmci command npm install -g snyk
|
- npmci npm prepare
|
||||||
- npmci command npm install --ignore-scripts
|
- npmci command npm install --production --ignore-scripts
|
||||||
- npmci command snyk test
|
- npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
# - npmci command npm audit --audit-level=high --only=prod --production
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
|
||||||
|
auditDevDependencies:
|
||||||
|
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
stage: security
|
||||||
|
script:
|
||||||
|
- npmci npm prepare
|
||||||
|
- npmci command npm install --ignore-scripts
|
||||||
|
- npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
- npmci command npm audit --audit-level=high --only=dev
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
# ====================
|
# ====================
|
||||||
# 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:
|
testStable:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci node install lts
|
- npmci npm prepare
|
||||||
- npmci npm install
|
- npmci node install stable
|
||||||
- npmci npm test
|
- npmci npm install
|
||||||
|
- npmci npm test
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
|
||||||
|
testBuild:
|
||||||
testSTABLE:
|
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci node install stable
|
- npmci npm prepare
|
||||||
- npmci npm install
|
- npmci node install stable
|
||||||
- npmci npm test
|
- npmci npm install
|
||||||
|
- npmci command npm run build
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
|
||||||
|
|
||||||
release:
|
release:
|
||||||
stage: release
|
stage: release
|
||||||
script:
|
script:
|
||||||
- npmci node install stable
|
- npmci node install stable
|
||||||
- npmci npm publish
|
- npmci npm publish
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- lossless
|
||||||
- notpriv
|
- docker
|
||||||
|
- notpriv
|
||||||
|
|
||||||
# ====================
|
# ====================
|
||||||
# metadata stage
|
# metadata stage
|
||||||
# ====================
|
# ====================
|
||||||
codequality:
|
codequality:
|
||||||
stage: metadata
|
stage: metadata
|
||||||
image: docker:stable
|
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
services:
|
only:
|
||||||
- docker:stable-dind
|
- tags
|
||||||
script:
|
script:
|
||||||
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
|
- npmci command npm install -g tslint typescript
|
||||||
- docker run
|
- npmci npm prepare
|
||||||
--env SOURCE_CODE="$PWD"
|
- npmci npm install
|
||||||
--volume "$PWD":/code
|
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
|
||||||
--volume /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
"registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
|
|
||||||
artifacts:
|
|
||||||
paths: [codeclimate.json]
|
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- lossless
|
||||||
- priv
|
- docker
|
||||||
|
- priv
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
stage: metadata
|
stage: metadata
|
||||||
script:
|
script:
|
||||||
- npmci trigger
|
- npmci trigger
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- lossless
|
||||||
- notpriv
|
- docker
|
||||||
|
- notpriv
|
||||||
|
|
||||||
pages:
|
pages:
|
||||||
image: hosttoday/ht-docker-node:npmci
|
|
||||||
stage: metadata
|
stage: metadata
|
||||||
script:
|
script:
|
||||||
- npmci command npm install -g typedoc typescript
|
- npmci node install lts
|
||||||
|
- npmci command npm install -g @gitzone/tsdoc
|
||||||
|
- npmci npm prepare
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci command typedoc --module "commonjs" --target "ES2016" --out public/ ts/
|
- npmci command tsdoc
|
||||||
tags:
|
tags:
|
||||||
|
- lossless
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
- notpriv
|
||||||
only:
|
only:
|
||||||
@ -128,15 +133,5 @@ pages:
|
|||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
paths:
|
paths:
|
||||||
- public
|
- 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
|
allow_failure: true
|
||||||
|
29
.vscode/launch.json
vendored
Normal file
29
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "current file",
|
||||||
|
"type": "node",
|
||||||
|
"request": "launch",
|
||||||
|
"args": [
|
||||||
|
"${relativeFile}"
|
||||||
|
],
|
||||||
|
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
||||||
|
"cwd": "${workspaceRoot}",
|
||||||
|
"protocol": "inspector",
|
||||||
|
"internalConsoleOptions": "openOnSessionStart"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "test.ts",
|
||||||
|
"type": "node",
|
||||||
|
"request": "launch",
|
||||||
|
"args": [
|
||||||
|
"test/test.ts"
|
||||||
|
],
|
||||||
|
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
||||||
|
"cwd": "${workspaceRoot}",
|
||||||
|
"protocol": "inspector",
|
||||||
|
"internalConsoleOptions": "openOnSessionStart"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
26
.vscode/settings.json
vendored
Normal file
26
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"json.schemas": [
|
||||||
|
{
|
||||||
|
"fileMatch": ["/npmextra.json"],
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"npmci": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "settings for npmci"
|
||||||
|
},
|
||||||
|
"gitzone": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "settings for gitzone",
|
||||||
|
"properties": {
|
||||||
|
"projectType": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["website", "element", "service", "npm", "wcc"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
3
cli.js
3
cli.js
@ -1,3 +1,4 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
process.env.CLI_CALL = 'true';
|
process.env.CLI_CALL = 'true';
|
||||||
require('./dist/index');
|
const cliTool = require('./dist_ts/index');
|
||||||
|
cliTool.runCli();
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
process.env.CLI_CALL = 'true';
|
process.env.CLI_CALL = 'true';
|
||||||
require('@gitzone/tsrun');
|
require('@gitzone/tsrun');
|
||||||
require('./ts/index');
|
const cliTool = require('./ts/index');
|
||||||
|
cliTool.runCli();
|
||||||
|
@ -2,5 +2,16 @@
|
|||||||
"npmci": {
|
"npmci": {
|
||||||
"npmGlobalTools": [],
|
"npmGlobalTools": [],
|
||||||
"npmAccessLevel": "public"
|
"npmAccessLevel": "public"
|
||||||
|
},
|
||||||
|
"gitzone": {
|
||||||
|
"projectType": "npm",
|
||||||
|
"module": {
|
||||||
|
"githost": "gitlab.com",
|
||||||
|
"gitscope": "gitzone",
|
||||||
|
"gitrepo": "tstest",
|
||||||
|
"shortDescription": "a test utility to run tests that match test/**/*.ts",
|
||||||
|
"npmPackagename": "@gitzone/tstest",
|
||||||
|
"license": "MIT"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
9947
package-lock.json
generated
9947
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
54
package.json
54
package.json
@ -1,35 +1,55 @@
|
|||||||
{
|
{
|
||||||
"name": "@gitzone/tstest",
|
"name": "@gitzone/tstest",
|
||||||
"version": "1.0.16",
|
"version": "1.0.52",
|
||||||
"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_ts/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist_ts/index.d.ts",
|
||||||
"author": "Lossless GmbH",
|
"author": "Lossless GmbH",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bin": {
|
"bin": {
|
||||||
"tstest": "./cli.js"
|
"tstest": "./cli.js"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(npm run prepareTest && npm run tstest && npm run cleanUp)",
|
"test": "(npm run cleanUp && npm run prepareTest && npm run tstest)",
|
||||||
"prepareTest": "git clone https://gitlab.com/sandboxzone/sandbox-npmts.git .nogit/sandbox-npmts && cd .nogit/sandbox-npmts && npm install",
|
"prepareTest": "git clone https://gitlab.com/sandboxzone/sandbox-npmts.git .nogit/sandbox-npmts && cd .nogit/sandbox-npmts && npm install",
|
||||||
"tstest": "cd .nogit/sandbox-npmts && node ../../cli.ts.js test/",
|
"tstest": "cd .nogit/sandbox-npmts && node ../../cli.ts.js test/ --web",
|
||||||
"cleanUp": "rm -rf .nogit/sandbox-npmts",
|
"cleanUp": "rm -rf .nogit/sandbox-npmts",
|
||||||
"format": "(gitzone format)",
|
"build": "(tsbuild --web)"
|
||||||
"build": "(tsbuild)"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.2",
|
"@gitzone/tsbuild": "^2.1.25",
|
||||||
"@pushrocks/tapbundle": "^3.0.7"
|
"tslint": "^6.1.3",
|
||||||
|
"tslint-config-prettier": "^1.18.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@gitzone/tsrun": "^1.1.16",
|
"@gitzone/tsbundle": "^1.0.78",
|
||||||
|
"@gitzone/tsrun": "^1.2.12",
|
||||||
"@pushrocks/consolecolor": "^2.0.1",
|
"@pushrocks/consolecolor": "^2.0.1",
|
||||||
"@pushrocks/smartfile": "^6.0.11",
|
"@pushrocks/smartbrowser": "^1.0.17",
|
||||||
"@pushrocks/smartlog": "^2.0.9",
|
"@pushrocks/smartdelay": "^2.0.10",
|
||||||
"@pushrocks/smartpromise": "^2.0.5",
|
"@pushrocks/smartexpress": "^3.0.76",
|
||||||
"@pushrocks/smartshell": "^2.0.11",
|
"@pushrocks/smartfile": "^8.0.0",
|
||||||
"@types/figures": "^2.0.0",
|
"@pushrocks/smartlog": "^2.0.39",
|
||||||
"figures": "^2.0.0"
|
"@pushrocks/smartpromise": "^3.0.6",
|
||||||
}
|
"@pushrocks/smartshell": "^2.0.25",
|
||||||
|
"@pushrocks/tapbundle": "^3.2.9",
|
||||||
|
"@types/figures": "^3.0.1",
|
||||||
|
"figures": "^3.0.0"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"ts/**/*",
|
||||||
|
"ts_web/**/*",
|
||||||
|
"dist/**/*",
|
||||||
|
"dist_*/**/*",
|
||||||
|
"dist_ts/**/*",
|
||||||
|
"dist_ts_web/**/*",
|
||||||
|
"assets/**/*",
|
||||||
|
"cli.js",
|
||||||
|
"npmextra.json",
|
||||||
|
"readme.md"
|
||||||
|
],
|
||||||
|
"browserslist": [
|
||||||
|
"last 1 chrome versions"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
41
readme.md
Normal file
41
readme.md
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
# @gitzone/tstest
|
||||||
|
a test utility to run tests that match test/**/*.ts
|
||||||
|
|
||||||
|
## Availabililty and Links
|
||||||
|
* [npmjs.org (npm package)](https://www.npmjs.com/package/@gitzone/tstest)
|
||||||
|
* [gitlab.com (source)](https://gitlab.com/gitzone/tstest)
|
||||||
|
* [github.com (source mirror)](https://github.com/gitzone/tstest)
|
||||||
|
* [docs (typedoc)](https://gitzone.gitlab.io/tstest/)
|
||||||
|
|
||||||
|
## Status for master
|
||||||
|
|
||||||
|
Status Category | Status Badge
|
||||||
|
-- | --
|
||||||
|
GitLab Pipelines | [](https://lossless.cloud)
|
||||||
|
GitLab Pipline Test Coverage | [](https://lossless.cloud)
|
||||||
|
npm | [](https://lossless.cloud)
|
||||||
|
Snyk | [](https://lossless.cloud)
|
||||||
|
TypeScript Support | [](https://lossless.cloud)
|
||||||
|
node Support | [](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||||
|
Code Style | [](https://lossless.cloud)
|
||||||
|
PackagePhobia (total standalone install weight) | [](https://lossless.cloud)
|
||||||
|
PackagePhobia (package size on registry) | [](https://lossless.cloud)
|
||||||
|
BundlePhobia (total size when bundled) | [](https://lossless.cloud)
|
||||||
|
Platform support | [](https://lossless.cloud) [](https://lossless.cloud)
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
## Contribution
|
||||||
|
|
||||||
|
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)
|
||||||
|
|
||||||
|
## Contribution
|
||||||
|
|
||||||
|
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)
|
||||||
|
|
||||||
|
For further information read the linked docs at the top of this readme.
|
||||||
|
|
||||||
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||||
|
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
|
||||||
|
|
||||||
|
[](https://maintainedby.lossless.com)
|
@ -1,9 +1,6 @@
|
|||||||
import { TsTest } from './tstest.classes.tstest';
|
import { TsTest } from './tstest.classes.tstest';
|
||||||
|
|
||||||
const cliRun = async () => {
|
export const runCli = async () => {
|
||||||
if (process.env.CLI_CALL) {
|
const tsTestInstance = new TsTest(process.cwd(), process.argv[2]);
|
||||||
const tsTestInstance = new TsTest(process.cwd(), process.argv[2]);
|
await tsTestInstance.run();
|
||||||
await tsTestInstance.run();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
cliRun();
|
|
||||||
|
@ -14,11 +14,30 @@ 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) {
|
||||||
if (tapParser.getErrorTests().length === 0) {
|
if (!tapParser.expectedTests) {
|
||||||
|
failGlobal = true;
|
||||||
|
let overviewString =
|
||||||
|
logPrefixes.TsTestPrefix +
|
||||||
|
cs(` ${tapParser.fileName} ${plugins.figures.cross}`, 'red') +
|
||||||
|
` ${plugins.figures.pointer} ` +
|
||||||
|
`does not specify tests!`;
|
||||||
|
console.log(overviewString);
|
||||||
|
} else if (tapParser.expectedTests !== tapParser.receivedTests) {
|
||||||
|
failGlobal = true;
|
||||||
|
let overviewString =
|
||||||
|
logPrefixes.TsTestPrefix +
|
||||||
|
cs(` ${tapParser.fileName} ${plugins.figures.cross}`, 'red') +
|
||||||
|
` ${plugins.figures.pointer} ` +
|
||||||
|
tapParser.getTestOverviewAsString() +
|
||||||
|
`did not execute all specified tests!`;
|
||||||
|
console.log(overviewString);
|
||||||
|
} else if (tapParser.getErrorTests().length === 0) {
|
||||||
let overviewString =
|
let overviewString =
|
||||||
logPrefixes.TsTestPrefix +
|
logPrefixes.TsTestPrefix +
|
||||||
cs(` ${tapParser.fileName} ${plugins.figures.tick}`, 'green') +
|
cs(` ${tapParser.fileName} ${plugins.figures.tick}`, 'green') +
|
||||||
@ -26,13 +45,13 @@ export class TapCombinator {
|
|||||||
tapParser.getTestOverviewAsString();
|
tapParser.getTestOverviewAsString();
|
||||||
console.log(overviewString);
|
console.log(overviewString);
|
||||||
} else {
|
} else {
|
||||||
|
failGlobal = true;
|
||||||
let overviewString =
|
let overviewString =
|
||||||
logPrefixes.TsTestPrefix +
|
logPrefixes.TsTestPrefix +
|
||||||
cs(` ${tapParser.fileName} ${plugins.figures.cross}`, 'red') +
|
cs(` ${tapParser.fileName} ${plugins.figures.cross}`, 'red') +
|
||||||
` ${plugins.figures.pointer} ` +
|
` ${plugins.figures.pointer} ` +
|
||||||
tapParser.getTestOverviewAsString();
|
tapParser.getTestOverviewAsString();
|
||||||
console.log(overviewString);
|
console.log(overviewString);
|
||||||
failGlobal = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(cs(plugins.figures.hamburger.repeat(48), 'cyan'));
|
console.log(cs(plugins.figures.hamburger.repeat(48), 'cyan'));
|
||||||
|
@ -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);
|
||||||
@ -111,15 +105,15 @@ export class TapParser {
|
|||||||
/**
|
/**
|
||||||
* returns all tests that are not completed
|
* returns all tests that are not completed
|
||||||
*/
|
*/
|
||||||
getUncompletedTests() {
|
public getUncompletedTests() {
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns all tests that threw an error
|
* returns all tests that threw an error
|
||||||
*/
|
*/
|
||||||
getErrorTests() {
|
public getErrorTests() {
|
||||||
return this.testStore.filter(tapTestArg => {
|
return this.testStore.filter((tapTestArg) => {
|
||||||
return !tapTestArg.testOk;
|
return !tapTestArg.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 (const test of this.testStore) {
|
||||||
if(overviewString !== '') {
|
if (overviewString !== '') {
|
||||||
overviewString += ' | ';
|
overviewString += ' | ';
|
||||||
}
|
}
|
||||||
if (test.testOk) {
|
if (test.testOk) {
|
||||||
@ -146,54 +140,63 @@ export class TapParser {
|
|||||||
* handles a tap process
|
* handles a tap process
|
||||||
* @param childProcessArg
|
* @param childProcessArg
|
||||||
*/
|
*/
|
||||||
async handleTapProcess(childProcessArg: ChildProcess) {
|
public async handleTapProcess(childProcessArg: ChildProcess) {
|
||||||
const done = plugins.smartpromise.defer();
|
const done = plugins.smartpromise.defer();
|
||||||
childProcessArg.stdout.on('data', data => {
|
childProcessArg.stdout.on('data', (data) => {
|
||||||
this._processLog(data);
|
this._processLog(data);
|
||||||
});
|
});
|
||||||
childProcessArg.stderr.on('data', data => {
|
childProcessArg.stderr.on('data', (data) => {
|
||||||
this._processLog(data);
|
this._processLog(data);
|
||||||
});
|
});
|
||||||
childProcessArg.on('exit', () => {
|
childProcessArg.on('exit', async () => {
|
||||||
this.receivedTests = this.testStore.length;
|
await this._evaluateResult();
|
||||||
|
|
||||||
// check wether all tests ran
|
|
||||||
if (this.expectedTests === this.receivedTests) {
|
|
||||||
console.log(
|
|
||||||
`${logPrefixes.TapPrefix} ${cs(
|
|
||||||
`${this.receivedTests} out of ${
|
|
||||||
this.expectedTests
|
|
||||||
} Tests completed!`,
|
|
||||||
'green'
|
|
||||||
)}`
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
console.log(
|
|
||||||
`${logPrefixes.TapErrorPrefix} ${cs(
|
|
||||||
`Only ${this.receivedTests} out of ${
|
|
||||||
this.expectedTests
|
|
||||||
} completed!`,
|
|
||||||
'red'
|
|
||||||
)}`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (this.getErrorTests().length === 0) {
|
|
||||||
console.log(
|
|
||||||
`${logPrefixes.TapPrefix} ${cs(
|
|
||||||
`All tests are successfull!!!`,
|
|
||||||
'green'
|
|
||||||
)}`
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
console.log(
|
|
||||||
`${logPrefixes.TapPrefix} ${cs(
|
|
||||||
`${this.getErrorTests().length} tests threw an error!!!`,
|
|
||||||
'red'
|
|
||||||
)}`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
done.resolve();
|
done.resolve();
|
||||||
});
|
});
|
||||||
await done.promise;
|
await done.promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async handleTapLog(tapLog: string) {
|
||||||
|
this._processLog(tapLog);
|
||||||
|
await this._evaluateResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async _evaluateResult() {
|
||||||
|
this.receivedTests = this.testStore.length;
|
||||||
|
|
||||||
|
// check wether all tests ran
|
||||||
|
if (this.expectedTests === this.receivedTests) {
|
||||||
|
console.log(
|
||||||
|
`${logPrefixes.TapPrefix} ${cs(
|
||||||
|
`${this.receivedTests} out of ${this.expectedTests} Tests completed!`,
|
||||||
|
'green'
|
||||||
|
)}`
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
console.log(
|
||||||
|
`${logPrefixes.TapErrorPrefix} ${cs(
|
||||||
|
`Only ${this.receivedTests} out of ${this.expectedTests} completed!`,
|
||||||
|
'red'
|
||||||
|
)}`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (!this.expectedTests) {
|
||||||
|
console.log(cs('Error: No tests were defined. Therefore the testfile failed!', 'red'));
|
||||||
|
} else if (this.expectedTests !== this.receivedTests) {
|
||||||
|
console.log(
|
||||||
|
cs(
|
||||||
|
'Error: The amount of received tests and expectedTests is unequal! Therefore the testfile failed',
|
||||||
|
'red'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
} else if (this.getErrorTests().length === 0) {
|
||||||
|
console.log(`${logPrefixes.TapPrefix} ${cs(`All tests are successfull!!!`, 'green')}`);
|
||||||
|
} else {
|
||||||
|
console.log(
|
||||||
|
`${logPrefixes.TapPrefix} ${cs(
|
||||||
|
`${this.getErrorTests().length} tests threw an error!!!`,
|
||||||
|
'red'
|
||||||
|
)}`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ export class TestDirectory {
|
|||||||
private async _init() {
|
private async _init() {
|
||||||
this.testfileArray = await plugins.smartfile.fs.fileTreeToObject(
|
this.testfileArray = await plugins.smartfile.fs.fileTreeToObject(
|
||||||
plugins.path.join(this.cwd, this.relativePath),
|
plugins.path.join(this.cwd, this.relativePath),
|
||||||
'**/*.ts'
|
'test*.ts'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,16 @@ import { TapCombinator } from './tstest.classes.tap.combinator';
|
|||||||
import { TapParser } from './tstest.classes.tap.parser';
|
import { TapParser } from './tstest.classes.tap.parser';
|
||||||
|
|
||||||
export class TsTest {
|
export class TsTest {
|
||||||
testDir: TestDirectory;
|
public testDir: TestDirectory;
|
||||||
|
|
||||||
|
public smartshellInstance = new plugins.smartshell.Smartshell({
|
||||||
|
executor: 'bash',
|
||||||
|
pathDirectories: [paths.binDirectory],
|
||||||
|
sourceFilePaths: [],
|
||||||
|
});
|
||||||
|
public smartbrowserInstance = new plugins.smartbrowser.SmartBrowser();
|
||||||
|
|
||||||
|
public tsbundleInstance = new plugins.tsbundle.TsBundle();
|
||||||
|
|
||||||
constructor(cwdArg: string, relativePathToTestDirectory: string) {
|
constructor(cwdArg: string, relativePathToTestDirectory: string) {
|
||||||
this.testDir = new TestDirectory(cwdArg, relativePathToTestDirectory);
|
this.testDir = new TestDirectory(cwdArg, relativePathToTestDirectory);
|
||||||
@ -25,29 +34,189 @@ export class TsTest {
|
|||||||
}
|
}
|
||||||
console.log('-'.repeat(48));
|
console.log('-'.repeat(48));
|
||||||
console.log(''); // force new line
|
console.log(''); // force new line
|
||||||
const smartshellInstance = new plugins.smartshell.Smartshell({
|
|
||||||
executor: 'bash',
|
|
||||||
pathDirectories: [paths.binDirectory],
|
|
||||||
sourceFilePaths: []
|
|
||||||
});
|
|
||||||
const tapCombinator = new TapCombinator(); // lets create the TapCombinator
|
|
||||||
for (const fileName of fileNamesToRun) {
|
|
||||||
console.log(`${cs('=> ', 'blue')} Running ${cs(fileName, 'orange')}`);
|
|
||||||
console.log(cs(`=`.repeat(16), 'cyan'));
|
|
||||||
const tapParser = new TapParser(fileName);
|
|
||||||
|
|
||||||
// tsrun options
|
const tapCombinator = new TapCombinator(); // lets create the TapCombinator
|
||||||
let tsrunOptions = ''
|
for (const fileNameArg of fileNamesToRun) {
|
||||||
if(process.argv.includes('--web')) {
|
switch (true) {
|
||||||
tsrunOptions += ' --web'
|
case process.env.CI && fileNameArg.includes('.nonci.'):
|
||||||
|
console.log('!!!!!!!!!!!');
|
||||||
|
console.log(
|
||||||
|
`not running testfile ${fileNameArg}, sinc we are CI and file name includes '.nonci.' tag`
|
||||||
|
);
|
||||||
|
console.log('!!!!!!!!!!!');
|
||||||
|
break;
|
||||||
|
case fileNameArg.endsWith('.browser.ts'):
|
||||||
|
const tapParserBrowser = await this.runInChrome(fileNameArg);
|
||||||
|
tapCombinator.addTapParser(tapParserBrowser);
|
||||||
|
break;
|
||||||
|
case fileNameArg.endsWith('.both.ts'):
|
||||||
|
console.log('>>>>>>> TEST PART 1: chrome');
|
||||||
|
const tapParserBothBrowser = await this.runInChrome(fileNameArg);
|
||||||
|
tapCombinator.addTapParser(tapParserBothBrowser);
|
||||||
|
console.log(cs(`|`.repeat(16), 'cyan'));
|
||||||
|
console.log(''); // force new line
|
||||||
|
console.log('>>>>>>> TEST PART 2: node');
|
||||||
|
const tapParserBothNode = await this.runInNode(fileNameArg);
|
||||||
|
tapCombinator.addTapParser(tapParserBothNode);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
const tapParserNode = await this.runInNode(fileNameArg);
|
||||||
|
tapCombinator.addTapParser(tapParserNode);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
const execResultStreaming = await smartshellInstance.execStreamingSilent(`tsrun ${fileName}${tsrunOptions}`);
|
|
||||||
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
|
||||||
tapCombinator.addTapParser(tapParser);
|
|
||||||
}
|
}
|
||||||
tapCombinator.evaluate();
|
tapCombinator.evaluate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async runInNode(fileNameArg: string): Promise<TapParser> {
|
||||||
|
console.log(`${cs('=> ', 'blue')} Running ${cs(fileNameArg, 'orange')} in node.js runtime.`);
|
||||||
|
console.log(`${cs(`= `.repeat(32), 'cyan')}`);
|
||||||
|
const tapParser = new TapParser(fileNameArg + ':node');
|
||||||
|
|
||||||
|
// tsrun options
|
||||||
|
let tsrunOptions = '';
|
||||||
|
if (process.argv.includes('--web')) {
|
||||||
|
tsrunOptions += ' --web';
|
||||||
|
}
|
||||||
|
|
||||||
|
const execResultStreaming = await this.smartshellInstance.execStreamingSilent(
|
||||||
|
`tsrun ${fileNameArg}${tsrunOptions}`
|
||||||
|
);
|
||||||
|
await tapParser.handleTapProcess(execResultStreaming.childProcess);
|
||||||
|
return tapParser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async runInChrome(fileNameArg: string): Promise<TapParser> {
|
||||||
|
console.log(`${cs('=> ', 'blue')} Running ${cs(fileNameArg, 'orange')} in chromium runtime.`);
|
||||||
|
console.log(`${cs(`= `.repeat(32), 'cyan')}`);
|
||||||
|
|
||||||
|
// lets get all our paths sorted
|
||||||
|
const tsbundleCacheDirPath = plugins.path.join(paths.cwd, './.nogit/tstest_cache');
|
||||||
|
const bundleFileName = fileNameArg.replace('/', '__') + '.js';
|
||||||
|
const bundleFilePath = plugins.path.join(tsbundleCacheDirPath, bundleFileName);
|
||||||
|
|
||||||
|
// lets bundle the test
|
||||||
|
await plugins.smartfile.fs.ensureDir(tsbundleCacheDirPath);
|
||||||
|
await this.tsbundleInstance.buildTest(fileNameArg, bundleFilePath, 'parcel');
|
||||||
|
|
||||||
|
// lets create a server
|
||||||
|
const server = new plugins.smartexpress.Server({
|
||||||
|
cors: true,
|
||||||
|
port: 3007,
|
||||||
|
});
|
||||||
|
server.addRoute(
|
||||||
|
'/test',
|
||||||
|
new plugins.smartexpress.Handler('GET', async (req, res) => {
|
||||||
|
res.type('.html');
|
||||||
|
res.write(`
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script>
|
||||||
|
globalThis.testdom = true;
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body></body>
|
||||||
|
</html>
|
||||||
|
`);
|
||||||
|
res.end();
|
||||||
|
})
|
||||||
|
);
|
||||||
|
server.addRoute('*', new plugins.smartexpress.HandlerStatic(tsbundleCacheDirPath));
|
||||||
|
await server.start();
|
||||||
|
|
||||||
|
// lets do the browser bit
|
||||||
|
await this.smartbrowserInstance.start();
|
||||||
|
const evaluation = await this.smartbrowserInstance.evaluateOnPage(
|
||||||
|
`http://localhost:3007/test?bundleName=${bundleFileName}`,
|
||||||
|
async () => {
|
||||||
|
const convertToText = (obj) => {
|
||||||
|
// create an array that will later be joined into a string.
|
||||||
|
const stringArray = [];
|
||||||
|
|
||||||
|
if (typeof obj === 'object' && typeof obj.toString === 'function') {
|
||||||
|
stringArray.push(obj.toString());
|
||||||
|
} else if (typeof obj === 'object' && obj.join === undefined) {
|
||||||
|
stringArray.push('{');
|
||||||
|
for (const prop of Object.keys(obj)) {
|
||||||
|
stringArray.push(prop, ': ', convertToText(obj[prop]), ',');
|
||||||
|
}
|
||||||
|
stringArray.push('}');
|
||||||
|
|
||||||
|
// is array
|
||||||
|
} else if (typeof obj === 'object' && !(obj.join === undefined)) {
|
||||||
|
stringArray.push('[');
|
||||||
|
for (const prop of Object.keys(obj)) {
|
||||||
|
stringArray.push(convertToText(obj[prop]), ',');
|
||||||
|
}
|
||||||
|
stringArray.push(']');
|
||||||
|
|
||||||
|
// is function
|
||||||
|
} else if (typeof obj === 'function') {
|
||||||
|
stringArray.push(obj.toString());
|
||||||
|
|
||||||
|
// all other values can be done with JSON.stringify
|
||||||
|
} else {
|
||||||
|
stringArray.push(JSON.stringify(obj));
|
||||||
|
}
|
||||||
|
|
||||||
|
return stringArray.join('');
|
||||||
|
};
|
||||||
|
|
||||||
|
let logStore = '';
|
||||||
|
// tslint:disable-next-line: max-classes-per-file
|
||||||
|
const log = console.log.bind(console);
|
||||||
|
console.log = (...args) => {
|
||||||
|
args = args.map((argument) => {
|
||||||
|
return typeof argument !== 'string' ? convertToText(argument) : argument;
|
||||||
|
});
|
||||||
|
logStore += `${args}\n`;
|
||||||
|
log(...args);
|
||||||
|
};
|
||||||
|
const error = console.error;
|
||||||
|
console.error = (...args) => {
|
||||||
|
args = args.map((argument) => {
|
||||||
|
return typeof argument !== 'string' ? convertToText(argument) : argument;
|
||||||
|
});
|
||||||
|
logStore += `${args}\n`;
|
||||||
|
error(...args);
|
||||||
|
};
|
||||||
|
const bundleName = new URLSearchParams(window.location.search).get('bundleName');
|
||||||
|
console.log(`::TSTEST IN CHROMIUM:: Relevant Script name is: ${bundleName}`);
|
||||||
|
const bundleResponse = await fetch(`/${bundleName}`);
|
||||||
|
console.log(
|
||||||
|
`::TSTEST IN CHROMIUM:: Got ${bundleName} with STATUS ${bundleResponse.status}`
|
||||||
|
);
|
||||||
|
const bundle = await bundleResponse.text();
|
||||||
|
console.log(`::TSTEST IN CHROMIUM:: Executing ${bundleName}`);
|
||||||
|
try {
|
||||||
|
// tslint:disable-next-line: no-eval
|
||||||
|
eval(bundle);
|
||||||
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (globalThis.tapbundleDeferred && globalThis.tapbundleDeferred.promise) {
|
||||||
|
await globalThis.tapbundleDeferred.promise;
|
||||||
|
} else {
|
||||||
|
console.log('Error: Could not find tapbundle Deferred');
|
||||||
|
}
|
||||||
|
return logStore;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
await this.smartbrowserInstance.stop();
|
||||||
|
await server.stop();
|
||||||
|
console.log(
|
||||||
|
`${cs('=> ', 'blue')} Stopped ${cs(fileNameArg, 'orange')} chromium instance and server.`
|
||||||
|
);
|
||||||
|
console.log(`${cs('=> ', 'blue')} See the result captured from the chromium execution:`);
|
||||||
|
// lets create the tap parser
|
||||||
|
const tapParser = new TapParser(fileNameArg + ':chrome');
|
||||||
|
tapParser.handleTapLog(evaluation);
|
||||||
|
return tapParser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async runInDeno() {}
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,37 @@
|
|||||||
// node native
|
// node native
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
|
export { path };
|
||||||
|
|
||||||
// @pushrocks scope
|
// @pushrocks scope
|
||||||
import * as consolecolor from '@pushrocks/consolecolor';
|
import * as consolecolor from '@pushrocks/consolecolor';
|
||||||
|
import * as smartbrowser from '@pushrocks/smartbrowser';
|
||||||
|
import * as smartexpress from '@pushrocks/smartexpress';
|
||||||
|
import * as smartdelay from '@pushrocks/smartdelay';
|
||||||
import * as smartfile from '@pushrocks/smartfile';
|
import * as smartfile from '@pushrocks/smartfile';
|
||||||
import * as smartlog from '@pushrocks/smartlog';
|
import * as smartlog from '@pushrocks/smartlog';
|
||||||
import * as smartpromise from '@pushrocks/smartpromise';
|
import * as smartpromise from '@pushrocks/smartpromise';
|
||||||
import * as smartshell from '@pushrocks/smartshell';
|
import * as smartshell from '@pushrocks/smartshell';
|
||||||
|
import * as tapbundle from '@pushrocks/tapbundle';
|
||||||
|
|
||||||
|
export {
|
||||||
|
consolecolor,
|
||||||
|
smartbrowser,
|
||||||
|
smartexpress,
|
||||||
|
smartdelay,
|
||||||
|
smartfile,
|
||||||
|
smartlog,
|
||||||
|
smartpromise,
|
||||||
|
smartshell,
|
||||||
|
tapbundle,
|
||||||
|
};
|
||||||
|
|
||||||
|
// @gitzone scope
|
||||||
|
import * as tsbundle from '@gitzone/tsbundle';
|
||||||
|
|
||||||
|
export { tsbundle };
|
||||||
|
|
||||||
// sindresorhus
|
// sindresorhus
|
||||||
import * as figures from 'figures';
|
import * as figures from 'figures';
|
||||||
|
|
||||||
export { consolecolor, figures, path, smartfile, smartlog, smartpromise, smartshell };
|
export { figures };
|
||||||
|
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"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user