Skip to content

Commit

Permalink
fix(ci): aaplLineMissingDataTrial
Browse files Browse the repository at this point in the history
  • Loading branch information
pearmini committed Jun 25, 2023
1 parent e3f436c commit 3246439
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 14 additions & 2 deletions __tests__/plots/static/aapl-line-missing-data-trial.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function aaplLineMissingDataTrial(): G2Spec {
type: 'map',
callback: (d) => ({
...d,
close1: d.date.getDate() <= 14 ? NaN : d.close,
close1: d.date.getUTCDate() <= 14 ? NaN : d.close,
}),
},
],
Expand All @@ -22,8 +22,20 @@ export function aaplLineMissingDataTrial(): G2Spec {
y: 'close1',
size: 'close',
},
scale: { x: { utc: true } },
style: { shape: 'trail' },
};
}

aaplLineMissingDataTrial.maxError = 125;
// Make the local ci and online ci covert Date object to consistent string.
let toString;
aaplLineMissingDataTrial.before = () => {
toString = Date.prototype.toString;
Date.prototype.toString = Date.prototype.toUTCString;
};

aaplLineMissingDataTrial.after = () => {
Date.prototype.toString = toString;
};

aaplLineMissingDataTrial.only = true;

0 comments on commit 3246439

Please sign in to comment.