Skip to content

Commit

Permalink
remove tests too
Browse files Browse the repository at this point in the history
  • Loading branch information
fippo committed Mar 24, 2024
1 parent 1d2d87f commit e346535
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions test/unit/chrome.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,50 +42,6 @@ describe('Chrome shim', () => {
};
});

describe('legacy getStats', () => {
let pc;
beforeEach(() => {
window.RTCPeerConnection.prototype.getStats = function(cb) {
setTimeout(cb, 0, {
result: () => [
makeLegacyStatsReport('localcandidate', {
portNumber: '31337',
ipAddress: '8.8.8.8',
transport: 'udp',
candidateType: 'host',
priority: '12345'
}),
]
});
};
shim.shimGetStats(window);
pc = new window.RTCPeerConnection();
});

it('returns a promise', () => {
return pc.getStats();
});

it('returns chrome legacy getStats when called with a callback', (done) => {
pc.getStats((result) => {
expect(result).toHaveProperty('result');
const report = result.result()[0];
expect(report).toHaveProperty('id');
expect(report).toHaveProperty('type');
expect(report).toHaveProperty('timestamp');
expect(report).toHaveProperty('stat');
done();
});
});

it('is translated into a Map', () => {
return pc.getStats()
.then(result => {
expect(result).toBeInstanceOf(Map);
});
});
});

describe('PeerConnection shim', () => {
it('fail silently if RTCPeerConnection is not present', () => {
window = {};
Expand Down

0 comments on commit e346535

Please sign in to comment.