Skip to content

Commit

Permalink
Add assertion and remove undefined ref
Browse files Browse the repository at this point in the history
  • Loading branch information
brollb committed Sep 12, 2023
1 parent ae25f8a commit 9ac0b48
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
41 changes: 41 additions & 0 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion utils/create-exercise-from-issue.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { assert } from "https://deno.land/[email protected]/assert/mod.ts";
import { parse } from "https://deno.land/x/xml/mod.ts";
import * as path from "https://deno.land/std/path/mod.ts";
const __filename = path.fromFileUrl(import.meta.url);
Expand Down Expand Up @@ -100,7 +101,6 @@ async function createExercise(filename: string): Promise<void> {
function hasParsonsProblem(xmlString: string, testSpecs: string[]) {
const xml = parse(xmlString);
assert(!Array.isArray(xml.room.role), "Multiple roles not yet supported");
const defs = testSpecs.map((spec) => getBlockDefinition(xml, spec));
return testSpecs.map((spec) => isParsonsProblem(xml, spec));
}

Expand Down

0 comments on commit 9ac0b48

Please sign in to comment.