diff --git a/packages/cli-exec/test/start.test.js b/packages/cli-exec/test/start.test.js index b6b6ba483..6296543bc 100644 --- a/packages/cli-exec/test/start.test.js +++ b/packages/cli-exec/test/start.test.js @@ -65,15 +65,10 @@ describe('percy exec:start', () => { expect(response).toHaveProperty('success', true); }); - describe('start', () => { - beforeAll(() => { - start(['--quiet', '--port=4567']); - }); - - it('can start on an alternate port', async () => { - let response = await request('http://localhost:4567/percy/healthcheck'); - expect(response).toHaveProperty('success', true); - }); + it('can start on an alternate port', async () => { + start(['--quiet', '--port=4567']); + let response = await request('http://localhost:4567/percy/healthcheck'); + expect(response).toHaveProperty('success', true); }); it('stops the process when terminated', async () => { diff --git a/packages/core/test/discovery.test.js b/packages/core/test/discovery.test.js index b0cecbc44..05ae96dc4 100644 --- a/packages/core/test/discovery.test.js +++ b/packages/core/test/discovery.test.js @@ -587,7 +587,7 @@ describe('Discovery', () => { await percy.idle(); expect(server.requests.map(r => r[0])) - .toEqual(['/', '/script.js', '/test.json', '/favicon.ico']); + .toEqual(['/', '/script.js', '/test.json']); expect(captured[0]).not.toEqual(jasmine.arrayContaining([ jasmine.objectContaining({ @@ -1545,7 +1545,6 @@ describe('Discovery', () => { let authDOM = testDOM.replace('img.gif', 'auth/img.gif'); beforeEach(() => { - jasmine.DEFAULT_TIMEOUT_INTERVAL = 40000; server.reply('/auth/img.gif', ({ headers: { authorization } }) => { if (authorization === 'Basic dGVzdDo=') { return [200, 'image/gif', pixel]; @@ -1793,7 +1792,7 @@ describe('Discovery', () => { // only one request for each resource should be made let paths = server.requests.map(r => r[0]); - expect(paths.sort()).toEqual(['/favicon.ico', '/img.gif', '/style.css']); + expect(paths.sort()).toEqual(['/img.gif', '/style.css']); // both snapshots' captured resources should match // the first captured resource is the log file which is dynamic @@ -1811,7 +1810,7 @@ describe('Discovery', () => { // two requests for each resource should be made (opposite of prev test) let paths = server.requests.map(r => r[0]); - expect(paths.sort()).toEqual(['/favicon.ico', '/img.gif', '/img.gif', '/style.css', '/style.css']); + expect(paths.sort()).toEqual(['/img.gif', '/img.gif', '/style.css', '/style.css']); // bot snapshots' captured resources should match // the first captured resource is the log file which is dynamic diff --git a/packages/core/test/snapshot.test.js b/packages/core/test/snapshot.test.js index be22db6ee..04d8f372c 100644 --- a/packages/core/test/snapshot.test.js +++ b/packages/core/test/snapshot.test.js @@ -1233,7 +1233,7 @@ describe('Snapshot', () => { await percy.idle(); let dom = i => Buffer.from(( - api.requests['/builds/123/resources'][i * 3] + api.requests['/builds/123/resources'][i * 2] .body.data.attributes['base64-content'] ), 'base64').toString(); @@ -1419,7 +1419,7 @@ describe('Snapshot', () => { ].join('')); expect(Buffer.from(( - api.requests['/builds/123/resources'][3] + api.requests['/builds/123/resources'][2] .body.data.attributes['base64-content'] ), 'base64').toString()).toMatch([ '

beforeResize - 400

', @@ -1527,9 +1527,9 @@ describe('Snapshot', () => { ).toString()).filter(s => s.startsWith('<')); expect(html[0]).toMatch('wait for timeout'); - expect(html[2]).toMatch('wait for selector'); - expect(html[4]).toMatch('wait for xpath'); - expect(html[6]).toMatch('wait for callback'); + expect(html[1]).toMatch('wait for selector'); + expect(html[2]).toMatch('wait for xpath'); + expect(html[3]).toMatch('wait for callback'); }); it('can execute scripts that scroll to the bottom of the page', async () => {