Skip to content

Commit

Permalink
update remove cookies test to no assume synchronous store
Browse files Browse the repository at this point in the history
  • Loading branch information
jstewmon committed May 7, 2019
1 parent 7ba4299 commit cfa92ab
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions test/api_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,16 @@ vows
const cookie = Cookie.parse("a=b; Domain=example.com; Path=/");
const cookie2 = Cookie.parse("a=b; Domain=foo.com; Path=/");
const cookie3 = Cookie.parse("foo=bar; Domain=foo.com; Path=/");
jar.setCookie(cookie, "http://example.com/index.html", () => {});
jar.setCookie(cookie2, "http://foo.com/index.html", () => {});
jar.setCookie(cookie3, "http://foo.com/index.html", () => {});
return jar;
async.parallel(
[
[cookie, "http://example.com/index.html"],
[cookie2, "http://foo.com/index.html"],
[cookie3, "http://foo.com/index.html"]
].map(args => cb => jar.setCookie(...args, cb)),
err => {
this.callback(err, jar);
}
);
},
"all from matching domain": function(jar) {
jar.store.removeCookies("example.com", null, err => {
Expand Down

0 comments on commit cfa92ab

Please sign in to comment.