Skip to content

Commit

Permalink
Merge pull request #637 from kwonoj/fix-getmessages-type
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonoj authored May 18, 2021
2 parents 6cca4e7 + b30e442 commit 4931860
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## [2.0.1](https://github.com/kwonoj/rx-sandbox/compare/v2.0.0...v2.0.1) (2021-05-18)


### Bug Fixes

* **getmessages:** update return type ([c2037bd](https://github.com/kwonoj/rx-sandbox/commit/c2037bd5048facab8d497dabee06221b03d82494))



# [2.0.0](https://github.com/kwonoj/rx-sandbox/compare/v2.0.0-beta.3...v2.0.0) (2021-05-18)


Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# RxSandbox

`RxSandbox` is test suite for RxJS, based on marble diagram DSL for easier assertion around Observables.
For RxJS 5 support, check pre-1.x versions. 1.x supports latest RxJS 6.x. 2.0.0-beta.* is available to support latest `rxjs@7.x` beta version.
For RxJS 5 support, check pre-1.x versions. 1.x supports latest RxJS 6.x. 2.* is available to support `rxjs@7.0.1` and above.

## What's difference with `TestScheduler` in RxJS?

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rx-sandbox",
"version": "2.0.0",
"version": "2.0.1",
"description": "Marble diagram DSL based test suite for RxJS 6",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
7 changes: 5 additions & 2 deletions src/scheduler/createTestScheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,14 @@ function getSchedulerFlushFunctions(state: SandboxState, flushWithAsyncTick: boo
return { flushUntil, advanceTo };
}

type getMessages = <T = string>(observable: Observable<T>, unsubscriptionMarbles?: string | null) => void;
type getMessages = <T = string>(
observable: Observable<T>,
unsubscriptionMarbles?: string | null
) => Array<TestMessage<T | Array<TestMessage<T>>>>;
type getMessagesWithTick = <T = string>(
observable: Observable<T>,
unsubscriptionMarbles?: string | null
) => Promise<void>;
) => Promise<Array<TestMessage<T | Array<TestMessage<T>>>>>;

/**
* create getMessages function. Depends on flush, this'll either work asynchronously or synchronously.
Expand Down

0 comments on commit 4931860

Please sign in to comment.