Skip to content

Commit

Permalink
Add iowa-electricity test for CSV loading
Browse files Browse the repository at this point in the history
  • Loading branch information
ekzhang committed Dec 10, 2021
1 parent b6c41d8 commit 445eaa1
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/lib/runtime.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ describe("promise cancellation", () => {
});

describe("import directives", () => {
it("can load vega-datasets/crimea", async () => {
it("can load crimea.json", async () => {
await init();
await checkProgram({
src: `import crimea from "npm://[email protected]/data/crimea.json"`,
Expand Down Expand Up @@ -262,6 +262,22 @@ describe("import directives", () => {
},
});
});

it("can load iowa-electricity.csv", async () => {
await init();
await checkProgram({
src: `
import iowa from "npm://[email protected]/data/iowa-electricity.csv"
count(value: count[1] { iowa() }).
`,
deps: [],
results: ["iowa", "count"],
input: {},
output: {
count: [{ value: 51 }],
},
});
});
});

describe("aggregation operators", () => {
Expand Down

0 comments on commit 445eaa1

Please sign in to comment.