Skip to content

Commit

Permalink
Removed extra 'not' where negate() is used
Browse files Browse the repository at this point in the history
  • Loading branch information
a-stankevich committed May 22, 2024
1 parent da1c33e commit 3da2125
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/helper/Nightmare.js
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ class Nightmare extends Helper {
*/
async dontSeeCookie(name) {
const res = await this.browser.cookies.get(name);
truth(`cookie ${name}`, 'not to be set').negate(res);
truth(`cookie ${name}`, 'to be set').negate(res);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/helper/Protractor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@ class Protractor extends Helper {
* {{> dontSeeCookie }}
*/
async dontSeeCookie(name) {
return this.browser.manage().getCookie(name).then(res => truth(`cookie ${name}`, 'not to be set').negate(res));
return this.browser.manage().getCookie(name).then(res => truth(`cookie ${name}`, 'to be set').negate(res));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/helper/WebDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -1731,7 +1731,7 @@ class WebDriver extends Helper {
*/
async dontSeeCookie(name) {
const cookie = await this.browser.getCookies([name]);
return truth(`cookie ${name}`, 'not to be set').negate(cookie);
return truth(`cookie ${name}`, 'to be set').negate(cookie);
}

/**
Expand Down

0 comments on commit 3da2125

Please sign in to comment.