mirror of
https://gitlab.com/nightlycommit/twing.git
synced 2025-01-18 08:46:50 +02:00
Merge branch 'issue-615' into 'milestone/7.0.0'
Resolve issue #615 See merge request nightlycommit/twing!608
This commit is contained in:
commit
4e24952608
8
.gitignore
vendored
8
.gitignore
vendored
@ -1,9 +1,3 @@
|
||||
.nyc_output
|
||||
dist
|
||||
coverage
|
||||
docs/.bundle
|
||||
docs/_site
|
||||
docs/vendor
|
||||
node_modules
|
||||
package-lock.json
|
||||
tmp
|
||||
package-lock.json
|
@ -29,7 +29,7 @@
|
||||
"html"
|
||||
],
|
||||
"include": [
|
||||
"**/src/**"
|
||||
"**/main/**"
|
||||
],
|
||||
"exclude": []
|
||||
}
|
@ -39,22 +39,22 @@ npm run test:browser
|
||||
|
||||
### Writing and executing tests
|
||||
|
||||
Assuming one want to execute the test located in `test/tests/integration/comparison/to-array.ts`, one would run:
|
||||
Assuming one want to execute the test located in `src/test/tests/integration/comparison/to-array.ts`, one would run:
|
||||
|
||||
```shell
|
||||
ts-node test/tests/integration/comparison/to-array.ts
|
||||
ts-node src/test/tests/integration/comparison/to-array.ts
|
||||
```
|
||||
|
||||
It is even possible - and recommended - to track the coverage while writing tests:
|
||||
|
||||
```shell
|
||||
nyc ts-node test/tests/integration/comparison/to-array.ts
|
||||
nyc ts-node src/test/tests/integration/comparison/to-array.ts
|
||||
```
|
||||
|
||||
Of course, it is also perfectly possible to pipe the result of the test to your favorite tap formatter:
|
||||
|
||||
```shell
|
||||
test/tests/integration/comparison$ ts-node . | tap-nyan
|
||||
src/test/tests/integration/comparison$ ts-node . | tap-nyan
|
||||
9 -_-_-_-_-_,------,
|
||||
0 -_-_-_-_-_| /\_/\
|
||||
0 -_-_-_-_-^|__( ^ .^)
|
||||
|
@ -34,9 +34,9 @@
|
||||
"test": "node dist/test",
|
||||
"test:browser": "browserify dist/test/index.js | tape-run --sandbox=false",
|
||||
"build": "npm run build:cjs && npm run build:types && npm run bundle",
|
||||
"build:cjs": "rimraf dist/cjs && tsc --project . --module commonjs --outDir dist/cjs",
|
||||
"build:test": "rimraf dist && tsc --project test --outDir dist",
|
||||
"build:types": "rimraf dist/types && tsc --project . --declaration true --emitDeclarationOnly true --outDir dist/types",
|
||||
"build:cjs": "rimraf dist/cjs && tsc --project src/main --module commonjs --outDir dist/cjs",
|
||||
"build:test": "rimraf dist && tsc --project src/test --outDir dist",
|
||||
"build:types": "rimraf dist/types && tsc --project src/main --declaration true --emitDeclarationOnly true --outDir dist/types",
|
||||
"bundle": "browserify dist/cjs/lib.js -g uglifyify -s Twing -o dist/lib.min.js"
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -265,7 +265,7 @@ export {createWithTagHandler} from "./lib/tag-handler/with";
|
||||
export type {
|
||||
TwingCallable, TwingCallableArgument, TwingCallableWrapperOptions, TwingCallableWrapper
|
||||
} from "./lib/callable-wrapper";
|
||||
export type {TwingContext} from "./lib/context";
|
||||
export {type TwingContext, createContext} from "./lib/context";
|
||||
export type {TwingEnvironment, TwingEnvironmentOptions, TwingNumberFormat} from "./lib/environment";
|
||||
export type {
|
||||
TwingEscapingStrategy, TwingEscapingStrategyHandler, TwingEscapingStrategyResolver
|
||||
@ -280,7 +280,7 @@ export type {TwingNodeVisitor} from "./lib/node-visitor";
|
||||
export type {
|
||||
TwingOperator, TwingOperatorAssociativity, TwingOperatorType, TwingOperatorExpressionFactory
|
||||
} from "./lib/operator";
|
||||
export type {TwingOutputBuffer} from "./lib/output-buffer";
|
||||
export {type TwingOutputBuffer, createOutputBuffer} from "./lib/output-buffer";
|
||||
export type {TwingParser, TwingParserOptions} from "./lib/parser";
|
||||
export type {TwingSandboxSecurityPolicy} from "./lib/sandbox/security-policy";
|
||||
export type {TwingSource} from "./lib/source";
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user