rx-sandbox
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -0,1 +1,11 @@ | ||
<a name="1.0.3"></a> | ||
## [1.0.3](https://github.com/kwonoj/rx-sandbox/compare/v1.0.2...v1.0.3) (2019-06-23) | ||
### Bug Fixes | ||
* **create:** relate maxframevalue to frametimefactor ([81587e8](https://github.com/kwonoj/rx-sandbox/commit/81587e8)) | ||
<a name="1.0.2"></a> | ||
@@ -2,0 +12,0 @@ ## [1.0.2](https://github.com/kwonoj/rx-sandbox/compare/v1.0.1...v1.0.2) (2019-01-10) |
import { TestMessage } from '../message/TestMessage'; | ||
declare const constructObservableMarble: <T = string>(value: TestMessage<T>[]) => string; | ||
declare const constructObservableMarble: <T extends Object = string>(value: TestMessage<T>[] | readonly TestMessage<T>[]) => string; | ||
export { constructObservableMarble }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var jest_matcher_utils_1 = require("jest-matcher-utils"); | ||
var matchers_1 = require("jest-matchers/build/matchers"); | ||
@@ -9,2 +8,3 @@ var SubscriptionLog_1 = require("rxjs/internal/testing/SubscriptionLog"); | ||
exports.constructSubscriptionMarble = constructSubscriptionMarble_1.constructSubscriptionMarble; | ||
var _a = require('jest-matcher-utils'), matcherHint = _a.matcherHint, printExpected = _a.printExpected, printReceived = _a.printReceived; //tslint:disable-line:no-require-imports no-var-requires | ||
var toEqualAssert = matchers_1.toEqual.bind({ expand: false }); | ||
@@ -15,3 +15,3 @@ var subscriptionMarbleAssert = function (source) { return function (expected) { | ||
var length_1 = source.length > expected.length ? source.length : expected.length; | ||
var description = "\n" + jest_matcher_utils_1.matcherHint(' to equal ') + "\n "; | ||
var description = "\n" + matcherHint(' to equal ') + "\n "; | ||
for (var idx = 0; idx < length_1; idx++) { | ||
@@ -27,3 +27,3 @@ var sourceMarble = !!source[idx] | ||
} | ||
description += "\n\n" + jest_matcher_utils_1.printReceived("Source: " + sourceMarble.marbleString) + "\n" + jest_matcher_utils_1.printReceived(" " + sourceMarble.frameString) + "\n" + jest_matcher_utils_1.printExpected("Expected: " + expectedMarble.marbleString) + "\n" + jest_matcher_utils_1.printExpected(" " + expectedMarble.frameString) + "\n "; | ||
description += "\n\n" + printReceived("Source: " + sourceMarble.marbleString) + "\n" + printReceived(" " + sourceMarble.frameString) + "\n" + printExpected("Expected: " + expectedMarble.marbleString) + "\n" + printExpected(" " + expectedMarble.frameString) + "\n "; | ||
} | ||
@@ -48,3 +48,3 @@ description += "\n" + asserted.message() + "\n"; | ||
if (!asserted.pass) { | ||
var description = "\n" + jest_matcher_utils_1.printReceived("Source: " + sourceMarble) + "\n" + jest_matcher_utils_1.printExpected("Expected: " + expectedMarble) + "\n\n" + asserted.message() + "\n "; | ||
var description = "\n" + printReceived("Source: " + sourceMarble) + "\n" + printExpected("Expected: " + expectedMarble) + "\n\n" + asserted.message() + "\n "; | ||
throw new Error(description); | ||
@@ -51,0 +51,0 @@ } |
@@ -24,3 +24,3 @@ "use strict"; | ||
if (maxFrameValue === void 0) { maxFrameValue = 1000; } | ||
var scheduler = new TestScheduler_1.TestScheduler(autoFlush, frameTimeFactor, maxFrameValue); | ||
var scheduler = new TestScheduler_1.TestScheduler(autoFlush, frameTimeFactor, Math.round(maxFrameValue / frameTimeFactor)); | ||
return { | ||
@@ -27,0 +27,0 @@ scheduler: scheduler, |
@@ -13,3 +13,3 @@ import { TestMessage } from '../message/TestMessage'; | ||
[key: string]: T; | ||
} | null | undefined, error?: any, materializeInnerObservables?: boolean, frameTimeFactor?: number, maxFrame?: number) => TestMessage<T | TestMessage<T>[]>[]; | ||
} | null | undefined, error?: any, materializeInnerObservables?: boolean, frameTimeFactor?: number, maxFrame?: number) => readonly TestMessage<T | TestMessage<T>[]>[]; | ||
export { parseObservableMarble }; |
{ | ||
"name": "rx-sandbox", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Marble diagram DSL based test suite for RxJS 6", | ||
@@ -26,3 +26,3 @@ "main": "./dist/src/index.js", | ||
"test": "jest --config jest.json --coverage", | ||
"lint": "tslint --type-check -c tslint.json -p tsconfig.json \"src/**/*.ts\" \"spec/**/*.ts\"", | ||
"lint": "tslint -c tslint.json -p tsconfig.json \"src/**/*.ts\" \"spec/**/*.ts\"", | ||
"lint:staged": "lint-staged", | ||
@@ -57,22 +57,23 @@ "build": "npm-run-all build:clean && tsc", | ||
"devDependencies": { | ||
"@commitlint/cli": "^7.2.1", | ||
"@commitlint/config-angular": "^7.1.2", | ||
"@commitlint/cli": "^8.0.0", | ||
"@commitlint/config-angular": "^8.0.0", | ||
"@types/chai": "^4.1.7", | ||
"@types/jest": "^23.3.12", | ||
"@types/jest": "^24.0.15", | ||
"@types/node": "^12.0.10", | ||
"chai": "^4.2.0", | ||
"commitizen": "^3.0.5", | ||
"conventional-changelog-cli": "^2.0.11", | ||
"commitizen": "^3.1.1", | ||
"conventional-changelog-cli": "^2.0.21", | ||
"cz-conventional-changelog": "2.1.0", | ||
"husky": "^1.3.1", | ||
"jest": "^23.6.0", | ||
"husky": "^2.4.1", | ||
"jest": "^24.8.0", | ||
"jest-spin-reporter": "^1.0.2", | ||
"lint-staged": "^8.1.0", | ||
"lint-staged": "^8.2.1", | ||
"npm-run-all": "^4.1.5", | ||
"prettier": "^1.15.3", | ||
"rxjs": "^6.3.3", | ||
"prettier": "^1.18.2", | ||
"rxjs": "^6.5.2", | ||
"shx": "^0.3.2", | ||
"ts-jest": "^23.10.5", | ||
"tslint": "^5.12.0", | ||
"ts-jest": "^24.0.2", | ||
"tslint": "^5.18.0", | ||
"tslint-no-unused-expression-chai": "^0.1.4", | ||
"typescript": "^3.2.2" | ||
"typescript": "^3.5.2" | ||
}, | ||
@@ -83,5 +84,5 @@ "peerDependencies": { | ||
"dependencies": { | ||
"jest-matcher-utils": "^23.6.0", | ||
"jest-matcher-utils": "^24.8.0", | ||
"jest-matchers": "^20.0.3", | ||
"tslib": "^1.9.3" | ||
"tslib": "^1.10.0" | ||
}, | ||
@@ -88,0 +89,0 @@ "husky": { |
@@ -124,7 +124,10 @@ [![Build Status](https://circleci.com/gh/kwonoj/rx-sandbox/tree/master.svg?style=shield&circle-token=:circle-token)](https://circleci.com/gh/kwonoj/rx-sandbox/tree/master) | ||
```typescript | ||
rxSandbox.create(autoFlush?: boolean, frameTimeFactor?: number): RxSandboxInstance | ||
rxSandbox.create(autoFlush?: boolean, frameTimeFactor?: number, maxFrameValue?: number): RxSandboxInstance | ||
``` | ||
Optional parameter values will be described further. | ||
`frameTimeFactor` allows to override default frame passage `1` to given value. | ||
`maxFrameValue` allows to override maximum frame number testscheduler will accept. (`1000` by default). Maxframevalue is relavant to frameTimeFactor. (i.e if `frameTimeFactor = 2` and `maxFrameValue = 4`, `--` will represent max frame) | ||
Refer below for `autoFlush` option. | ||
### Using RxSandboxInstance | ||
@@ -131,0 +134,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
101333
299
21
1134
+ Added@jest/types@24.9.0(transitive)
+ Added@types/istanbul-lib-coverage@2.0.6(transitive)
+ Added@types/istanbul-lib-report@3.0.3(transitive)
+ Added@types/istanbul-reports@1.1.2(transitive)
+ Added@types/yargs@13.0.12(transitive)
+ Added@types/yargs-parser@21.0.3(transitive)
+ Addedansi-regex@4.1.1(transitive)
+ Addeddiff-sequences@24.9.0(transitive)
+ Addedjest-diff@24.9.0(transitive)
+ Addedjest-get-type@24.9.0(transitive)
+ Addedjest-matcher-utils@24.9.0(transitive)
+ Addedpretty-format@24.9.0(transitive)
+ Addedreact-is@16.13.1(transitive)
- Removedansi-regex@3.0.1(transitive)
- Removedjest-get-type@22.4.3(transitive)
- Removedjest-matcher-utils@23.6.0(transitive)
- Removedpretty-format@23.6.0(transitive)
Updatedjest-matcher-utils@^24.8.0
Updatedtslib@^1.10.0