diff --git a/lib/smoke/checks.js b/lib/smoke/checks.js index 2bd2c3f..d185aa2 100644 --- a/lib/smoke/checks.js +++ b/lib/smoke/checks.js @@ -12,7 +12,7 @@ module.exports = { result: testPage.check.status === testPage.redirect.to }; } else { - return { expected: testPage.check.status, actual: testPage.status, result: testPage.status === testPage.check.status }; + return { expected: testPage.check.status, actual: testPage.status, result: testPage.status === testPage.check.status || testPage.status === 304 && testPage.check.status === 200 }; } }, diff --git a/test/fixtures/smoke-pass.js b/test/fixtures/smoke-pass.js index cd52d6e..50bfebb 100644 --- a/test/fixtures/smoke-pass.js +++ b/test/fixtures/smoke-pass.js @@ -2,6 +2,7 @@ module.exports = [{ urls: { '/status/200': 200, '/status/204': 204, // this will be skipped because we don't support it yet! + '/status/304': 200, // browsers will sometimes 304, so let's pretend like that is okay '/status/404': { status: 404, content: '404', diff --git a/test/tasks/smoke.js b/test/tasks/smoke.js index 33bfdd0..49fcd7c 100644 --- a/test/tasks/smoke.js +++ b/test/tasks/smoke.js @@ -18,7 +18,7 @@ describe('Smoke Tests of the Smoke', () => { }); return smoke.run() .then((results) => { - expect(results.passed.length).toEqual(10); + expect(results.passed.length).toEqual(11); expect(results.failed.length).toEqual(0); done(); });