Skip to content

Commit

Permalink
Try moving console expect
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Trana committed Aug 28, 2023
1 parent 3965695 commit d54b102
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/OTStreams.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ describe('OTStreams', () => {
it('should log error if no session provided', () => {
expect(() => {
mount(<OTStreams />);
expect(console.error.calls.allArgs()[0]).toMatch(/Failed prop type/);
}).not.toThrow();
expect(console.error.calls.allArgs()[0]).toMatch(/Failed prop type/);
});

it('should log error and throw if session provided', () => {
expect(() => {
mount(<OTStreams session={{}} />);
expect(console.error.calls.allArgs()[0]).toMatch(/Failed prop type/);
}).toThrow();
expect(console.error.calls.allArgs()[0]).toMatch(/Failed prop type/);
});
});

Expand All @@ -42,8 +42,8 @@ describe('OTStreams', () => {
<MyComponent />
</OTStreams>,
);
expect(console.error.calls.allArgs()[0]).toMatch(/Failed prop type/);
}).not.toThrow();
expect(console.error.calls.allArgs()[0]).toMatch(/Failed prop type/);
});

it('should log error and throw if session provided', () => {
Expand All @@ -54,8 +54,8 @@ describe('OTStreams', () => {
<MyComponent />
</OTStreams>,
);
expect(console.error.calls.allArgs()[0]).toMatch(/Failed prop type/);
}).toThrow();
expect(console.error.calls.allArgs()[0]).toMatch(/Failed prop type/);
});
});

Expand Down

0 comments on commit d54b102

Please sign in to comment.