Skip to content

Commit

Permalink
Fix passthrough of enableJavascript option. (#24)
Browse files Browse the repository at this point in the history
* Fix pass through of enableJavascript option.

* Fix tests.

* Fix variable name.
  • Loading branch information
fotinakis authored Mar 21, 2017
1 parent 0914e01 commit 74032a1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions addon/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ module.exports = {
{
name: data.name,
widths: widths,
enableJavaScript: data.enableJavaScript,
}
);

Expand Down
8 changes: 8 additions & 0 deletions tests/acceptance/dummy-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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});
});

0 comments on commit 74032a1

Please sign in to comment.