Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit e40881f

Browse files
committed
Improve cookies example
1 parent faee944 commit e40881f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

examples/cookies.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,13 @@ export default async function () {
114114
'the second filtered cookie name should be baz': c => c.name === 'baz',
115115
'the second filtered cookie value should be 44': c => c.value === '44',
116116
});
117+
118+
// clear cookies
119+
context.clearCookies();
120+
cookies = context.cookies();
121+
check(cookies.length, {
122+
'number of cookies should be zero': n => n === 0,
123+
});
117124
} finally {
118125
page.close();
119126
}

0 commit comments

Comments
 (0)