Skip to content

Commit

Permalink
Fixes lint recommendations for Jasmine
Browse files Browse the repository at this point in the history
  • Loading branch information
birme committed Jul 20, 2020
1 parent d4cb613 commit fdf396d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/srt_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,44 @@ describe("SRT library", () => {
it("can create an SRT socket", () => {
const srt = new SRT();
const socket = srt.createSocket();

expect(socket).not.toEqual(SRT.ERROR);
});

it("can create an SRT socket for sending data", () => {
const srt = new SRT();
const socket = srt.createSocket(true);

expect(socket).not.toEqual(SRT.ERROR);
});

it("can get socket state", () => {
const srt = new SRT();
const socket = srt.createSocket();
const state = srt.getSockState(socket);

expect(state).toEqual(SRT.SRTS_INIT);
});

it("can set SRT sockopt SRTO_MSS", () => {
const srt = new SRT();
const socket = srt.createSocket();
const result = srt.setSockOpt(socket, SRT.SRTO_MSS, 1052);

expect(result).not.toEqual(SRT.ERROR);
const value = srt.getSockOpt(socket, SRT.SRTO_MSS);

expect(value).toEqual(1052);
});

it("can set SRT socket in non-blocking mode", () => {
const srt = new SRT();
const socket = srt.createSocket();
const result = srt.setSockOpt(socket, SRT.SRTO_RCVSYN, false);

expect(result).not.toEqual(SRT.ERROR);
const value = srt.getSockOpt(socket, SRT.SRTO_RCVSYN);

expect(value).toEqual(false);
});

Expand All @@ -52,6 +59,7 @@ describe("SRT library", () => {
const epid = srt.epollCreate();
srt.epollAddUsock(epid, socket, SRT.EPOLL_IN | SRT.EPOLL_ERR);
const events = srt.epollUWait(epid, 500);

expect(events.length).toEqual(0);
});

Expand Down

0 comments on commit fdf396d

Please sign in to comment.