Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

Commit

Permalink
fix: make phantom audit work with websites that expose an AMD loader
Browse files Browse the repository at this point in the history
  • Loading branch information
joscha committed Nov 27, 2015
1 parent 34c11c2 commit 183233e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tools/runner/audit.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ if (system.args.length !== 2) {
);
phantom.exit();
} else {
page.evaluate(function() {
// if target website has an AMD loader, we need to make sure
// that window.axs is still available
if (typeof define !== 'undefined' && define.amd) {
define.amd = false;
}
});
page.injectJs('../../dist/js/axs_testing.js');
var report = page.evaluate(function() {
var results = axs.Audit.run();
Expand Down

0 comments on commit 183233e

Please sign in to comment.