Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
petrpatek committed Jan 13, 2020
1 parent bbd9af9 commit fd49fdf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/session_pool/session.js
Expand Up @@ -226,7 +226,7 @@ export class Session {
* @param url {String}
*/
setCookies(cookies, url) {
const isPuppeteerCookies = !!cookies[0].name;
const isPuppeteerCookies = !!cookies[0] && !!cookies[0].name;

for (const cookie of cookies) {
let cookieToSave;
Expand Down
2 changes: 1 addition & 1 deletion test/session_pool/session.test.js
Expand Up @@ -70,7 +70,7 @@ describe('Session - testing session behaviour ', () => {
let error;

try {
session.putResponse({ headers: { Cookie: 'invaldi*{*{*{*-----***@s' } });
session.setCookiesFromResponse({ headers: { Cookie: 'invaldi*{*{*{*-----***@s' } });
} catch (e) {
error = e;
}
Expand Down

0 comments on commit fd49fdf

Please sign in to comment.