Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

test: add stream transition tests #72

Merged
merged 1 commit into from
Jan 30, 2023

Conversation

eng-cc
Copy link
Contributor

@eng-cc eng-cc commented Jan 7, 2023

add stream transition tests.

TESTING INSTRUCTIONS

Clone this fork. Open a terminal and cd to root directory, then execute the following:

npm install && npm run test

@ddimaria
Copy link
Collaborator

ddimaria commented Jan 7, 2023

Thanks for the PR @SCCGITHUB 🙏 I haven't looked into it yet, but CI is failing. I can check further into it on Monday, but it might be related to code in the PR as CI previously passed.

@eng-cc
Copy link
Contributor Author

eng-cc commented Jan 9, 2023

Thanks for the PR @SCCGITHUB pray I haven't looked into it yet, but CI is failing. I can check further into it on Monday, but it might be related to code in the PR as CI previously passed.

It seems that the type of the dependent package has changed causing ci failing

@ddimaria
Copy link
Collaborator

I pulled in the updated debs to clear out that CI issue. This PR is not passing linting:

/home/runner/work/js-libp2p-webrtc/js-libp2p-webrtc/test/stream.browser.spec.ts:3:37: Extra semicolon. [Error/@typescript-eslint/semi]
/home/runner/work/js-libp2p-webrtc/js-libp2p-webrtc/test/stream.browser.spec.ts:5:36: Extra semicolon. [Error/@typescript-eslint/semi]
/home/runner/work/js-libp2p-webrtc/js-libp2p-webrtc/test/stream.browser.spec.ts:15:26: Missing space before function parentheses. [Error/@typescript-eslint/space-before-function-paren]
/home/runner/work/js-libp2p-webrtc/js-libp2p-webrtc/test/stream.browser.spec.ts:16:25: Extra semicolon. [Error/@typescript-eslint/semi]
/home/runner/work/js-libp2p-webrtc/js-libp2p-webrtc/test/stream.browser.spec.ts:17:3: 'testPb' is never reassigned. Use 'const' instead. [Error/prefer-const]
/home/runner/work/js-libp2p-webrtc/js-libp2p-webrtc/test/stream.browser.spec.ts:19:44: Unexpected trailing comma. [Error/comma-dangle]
/home/runner/work/js-libp2p-webrtc/js-libp2p-webrtc/test/stream.browser.spec.ts:20:4: Extra semicolon. [Error/@typescript-eslint/semi]
/home/runner/work/js-libp2p-webrtc/js-libp2p-webrtc/test/stream.browser.spec.ts:21:37: Extra semicolon. [Error/@typescript-eslint/semi]
/home/runner/work/js-libp2p-webrtc/js-libp2p-webrtc/test/stream.browser.spec.ts:83:7: 'webrtcStream' is never reassigned. Use 'const' instead. [Error/prefer-const]
/home/runner/work/js-libp2p-webrtc/js-libp2p-webrtc/test/stream.browser.spec.ts:83:42: Extra semicolon. [Error/@typescript-eslint/semi]
/home/runner/work/js-libp2p-webrtc/js-libp2p-webrtc/test/stream.browser.spec.ts:88:27: Forbidden non-null assertion. [Error/@typescript-eslint/no-non-null-assertion]
/home/runner/work/js-libp2p-webrtc/js-libp2p-webrtc/test/stream.browser.spec.ts:107:7: 'webrtcStream' is never reassigned. Use 'const' instead. [Error/prefer-const]
/home/runner/work/js-libp2p-webrtc/js-libp2p-webrtc/test/stream.browser.spec.ts:107:42: Extra semicolon. [Error/@typescript-eslint/semi]
/home/runner/work/js-libp2p-webrtc/js-libp2p-webrtc/test/stream.browser.spec.ts:120:3: Newline required at end of file but not found. [Error/eol-last]

You can try auto-fixing these with npm run lint:fix

@eng-cc eng-cc force-pushed the test_stream_transition branch 2 times, most recently from fe1876d to 713187d Compare January 11, 2023 03:50
Copy link
Collaborator

@ddimaria ddimaria left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding these tests 💯

Copy link
Collaborator

@ddimaria ddimaria left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See last comment around line 88

test/stream.browser.spec.ts Outdated Show resolved Hide resolved
@ckousik ckousik self-requested a review January 13, 2023 17:21
@eng-cc eng-cc requested review from ddimaria and removed request for achingbrain and ckousik January 26, 2023 12:35
Copy link
Collaborator

@ddimaria ddimaria left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the submission!

@ddimaria ddimaria merged commit 27ec3da into libp2p:main Jan 30, 2023
github-actions bot pushed a commit that referenced this pull request Jan 30, 2023
## [1.0.3](v1.0.2...v1.0.3) (2023-01-30)

### Tests

* add stream transition test ([#72](#72)) ([27ec3da](27ec3da))
@github-actions
Copy link

🎉 This PR is included in version 1.0.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants