From 89e923d5f088b526e8752dae4482d3aaa26de51a Mon Sep 17 00:00:00 2001 From: JoelEinbinder Date: Wed, 13 Sep 2017 17:30:25 -0700 Subject: [PATCH] Fix cookies test on windows (#772) The `username` and `password` cookies showed up in the wrong order on Windows, causing the test to fail. --- test/test.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test.js b/test/test.js index 81516ee318f..a2f5010b74a 100644 --- a/test/test.js +++ b/test/test.js @@ -2049,7 +2049,8 @@ describe('Page', function() { value: '123456' }); expect(await page.evaluate('document.cookie')).toBe('username=John Doe; password=123456'); - expect(await page.cookies()).toEqual([{ + const cookies = await page.cookies(); + expect(cookies.sort((a, b) => a.name.localeCompare(b.name))).toEqual([{ name: 'password', value: '123456', domain: 'localhost',