Skip to content
This repository has been archived by the owner on Jul 20, 2024. It is now read-only.

fix test for sender #15

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/continuous-integrations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: 'Continuous Integrations'
on:
push:
branches: ['main']
pull_request:
branches: ['main']

jobs:
lint:
Expand Down
28 changes: 14 additions & 14 deletions coverage/cobertura-coverage.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" ?>
<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
<coverage lines-valid="362" lines-covered="280" line-rate="0.7734000000000001" branches-valid="129" branches-covered="92" branch-rate="0.7131000000000001" timestamp="1701272381747" complexity="0" version="0.1">
<coverage lines-valid="362" lines-covered="281" line-rate="0.7762" branches-valid="129" branches-covered="92" branch-rate="0.7131000000000001" timestamp="1701332001048" complexity="0" version="0.1">
<sources>
<source>/Users/luongminh/workspace/bluesea/media-sdk-js</source>
</sources>
<packages>
<package name="lib" line-rate="0.784" branch-rate="0.619">
<package name="lib" line-rate="0.792" branch-rate="0.619">
<classes>
<class name="receiver.ts" filename="src/lib/receiver.ts" line-rate="0.7570999999999999" branch-rate="0.625">
<methods>
Expand Down Expand Up @@ -198,7 +198,7 @@
<line number="34" hits="1" branch="false"/>
</lines>
</class>
<class name="sender.ts" filename="src/lib/sender.ts" line-rate="0.7559999999999999" branch-rate="0.5">
<class name="sender.ts" filename="src/lib/sender.ts" line-rate="0.7804000000000001" branch-rate="0.5">
<methods>
<method name="(anonymous_7)" hits="13" signature="()V">
<lines>
Expand Down Expand Up @@ -230,9 +230,9 @@
<line number="28" hits="0"/>
</lines>
</method>
<method name="(anonymous_13)" hits="0" signature="()V">
<method name="(anonymous_13)" hits="2" signature="()V">
<lines>
<line number="32" hits="0"/>
<line number="32" hits="2"/>
</lines>
</method>
<method name="(anonymous_14)" hits="0" signature="()V">
Expand Down Expand Up @@ -272,7 +272,7 @@
</method>
<method name="(anonymous_21)" hits="1" signature="()V">
<lines>
<line number="85" hits="1"/>
<line number="86" hits="1"/>
</lines>
</method>
</methods>
Expand All @@ -287,7 +287,7 @@
<line number="21" hits="0" branch="false"/>
<line number="25" hits="0" branch="false"/>
<line number="29" hits="0" branch="false"/>
<line number="33" hits="0" branch="false"/>
<line number="33" hits="2" branch="false"/>
<line number="37" hits="0" branch="false"/>
<line number="41" hits="3" branch="false"/>
<line number="44" hits="3" branch="false"/>
Expand All @@ -307,17 +307,17 @@
<line number="71" hits="2" branch="false"/>
<line number="72" hits="2" branch="false"/>
<line number="73" hits="2" branch="false"/>
<line number="78" hits="2" branch="true" condition-coverage="100% (2/2)"/>
<line number="79" hits="1" branch="false"/>
<line number="81" hits="1" branch="false"/>
<line number="86" hits="1" branch="true" condition-coverage="0% (0/1)"/>
<line number="87" hits="0" branch="false"/>
<line number="89" hits="1" branch="false"/>
<line number="94" hits="1" branch="false"/>
<line number="79" hits="2" branch="true" condition-coverage="100% (2/2)"/>
<line number="80" hits="1" branch="false"/>
<line number="82" hits="1" branch="false"/>
<line number="87" hits="1" branch="true" condition-coverage="0% (0/1)"/>
<line number="88" hits="0" branch="false"/>
<line number="90" hits="1" branch="false"/>
<line number="95" hits="1" branch="false"/>
<line number="96" hits="1" branch="false"/>
<line number="97" hits="1" branch="false"/>
<line number="98" hits="1" branch="false"/>
<line number="99" hits="1" branch="false"/>
</lines>
</class>
</classes>
Expand Down
2 changes: 2 additions & 0 deletions src/lib/sender.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ describe('Sender', () => {
name: 'test-sender',
kind: 'video',
track: mockTrack.trackId,
label: 'test-sender',
});
expect(sender.state).toEqual(StreamSenderState.Connected);
});
Expand All @@ -54,6 +55,7 @@ describe('Sender', () => {
name: 'test-sender',
kind: 'video',
track: undefined,
label: 'test-sender',
});
expect(sender.state).toEqual(StreamSenderState.Deactivated);
});
Expand Down