feat(time): support promise test completion - #1015
Open
cerredz wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mockTimeSource().run()return a Promise when called without a callback, while preserving the existing callback formawait Time.run()type-checksFixes #765
Verification
node_modules\.bin\tsc.cmd --module commonjs --outDir .\lib\cjsnode_modules\.bin\tsc.cmd --module es6 --outDir .\lib\es6node_modules\.bin\tslint.cmd --project tsconfig.lint.json --config ..\tslint.jsonnode_modules\.bin\markdown-doctest.CMD(21 passed, 7 skipped)node_modules\.bin\mocha.cmd test/time.ts --require ts-node/register --grep promise-style --exit(6 passing)git diff --checkNote: the full
node_modules\.bin\mocha.cmd test/**/*.ts --require ts-node/register --exitrun reaches 118 passing tests including the new promise tests, then fails 12 existing unsubscribe timing assertions with the same[0, 1]vs[0]pattern across xstream/RxJS/most on this Windows + Node 22 environment. The focused promise tests pass independently.