diff --git a/addon/snapshot.js b/addon/snapshot.js index 45ab4773..e7860bf7 100644 --- a/addon/snapshot.js +++ b/addon/snapshot.js @@ -61,6 +61,7 @@ export function percySnapshot(name, options) { content: getDoctype() + domCopy[0].outerHTML, widths: options.widths, breakpoints: options.breakpoints, + enableJavaScript: options.enableJavaScript, }), statusCode: { 400: function(jqXHR) { diff --git a/index.js b/index.js index 8371caf5..1eabc219 100644 --- a/index.js +++ b/index.js @@ -313,6 +313,7 @@ module.exports = { { name: data.name, widths: widths, + enableJavaScript: data.enableJavaScript, } ); diff --git a/tests/acceptance/dummy-test.js b/tests/acceptance/dummy-test.js index a792a54e..a2b46946 100644 --- a/tests/acceptance/dummy-test.js +++ b/tests/acceptance/dummy-test.js @@ -35,3 +35,11 @@ test('name is autogenerated if given a Mocha test object', function(assert) { }; percySnapshot(mochaTestDouble); }); + +test('enableJavaScript option can pass through', function(assert) { + visit('/'); + andThen(function() { + assert.equal(currentURL(), '/'); + }); + percySnapshot(assert, {enableJavaScript: true}); +});