Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ubuntu test quirks
Browse files Browse the repository at this point in the history
texodus committed Jan 10, 2023
1 parent 4ec2b6c commit cb95ef8
Showing 7 changed files with 1,302 additions and 3,343 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@
"html-webpack-plugin": "^5.1.0",
"husky": "^7.0.4",
"inquirer": "^7.0.0",
"jest": "^29.3.1",
"jest": "^25.1.0",
"jest-junit": "^10.0.0",
"jsdoc": "3.5.5",
"jsdoc-babel": "^0.5.0",
5 changes: 5 additions & 0 deletions packages/perspective/test/js/pivots.js
Original file line number Diff line number Diff line change
@@ -2356,6 +2356,11 @@ module.exports = (perspective) => {
columns: ["x", "y"],
});
let result2 = await view.to_columns();
result2 = Object.entries(result2).reduce((obj, [key, val]) => {
obj[key.replace(/[^,:\/|A-Z0-9 ]/gi, " ")] = val;
return obj;
}, {});

expect(result2).toEqual({
"4/11/2019, 11:40:35 PM|x": [null, null, 3, 4],
"4/11/2019, 11:40:35 PM|y": [null, null, "c", "d"],
5 changes: 5 additions & 0 deletions packages/perspective/test/js/to_format.js
Original file line number Diff line number Diff line change
@@ -439,6 +439,11 @@ module.exports = (perspective) => {
]);
let view = await table.view();
let json = await view.to_json({ formatted: true });
json = json.map((obj) => {
obj.datetime = obj.datetime.replace(/[^:,\/|A-Z0-9 ]/gi, " ");
return obj;
}, {});

expect(json).toEqual([
{ datetime: "1/1/16, 12:30:00 AM" },
{ datetime: "6/15/16, 7:20:00 PM" },
1 change: 1 addition & 0 deletions rust/perspective-viewer/build.js
Original file line number Diff line number Diff line change
@@ -106,6 +106,7 @@ async function build_all() {
// legacy compat
execSync("cpy target/themes/* dist/css");
execSync("cpy dist/css/* dist/umd");
execSync("cpy dist/pkg/* dist/esm");
}

build_all();
2 changes: 1 addition & 1 deletion rust/perspective-viewer/src/rust/lib.rs
Original file line number Diff line number Diff line change
@@ -70,7 +70,7 @@ pub fn get_exprtk_commands() -> ApiResult<Box<[JsValue]>> {
#[wasm_bindgen(js_name = "defineWebComponents")]
pub fn js_define_web_components() {
tracing_wasm::set_as_global_default();
define_web_components!("export * as psp from '../../dist/pkg/perspective.js'");
define_web_components!("export * as psp from '../../perspective.js'");
}

/// Register Web Components with the global registry, given a Perspective
2 changes: 1 addition & 1 deletion scripts/install_emsdk.js
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ function upgrade() {
function check() {
try {
const emsdkdir = path.join(__dirname, "..", ".emsdk");
execute_throw`. ${emsdkdir}/emsdk_env.sh && emcc --version`;
execute_throw`cd ${emsdkdir} && . ${emsdkdir}/emsdk_env.sh && emcc --version`;
return true;
} catch (e) {
return fs.existsSync(path.join(__dirname, "..", ".emsdk"));
4,628 changes: 1,288 additions & 3,340 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit cb95ef8

Please sign in to comment.