UNPKG

grading

Version:

Grading of student submissions, in particular programming tests.

11 lines (9 loc) 379 B
import { Testsuite } from "../junit"; import { suggestSimilar } from "./suggestSimilar"; export function didYouMeanTest(testSuite: Testsuite | undefined, test: string) { if (!testSuite || testSuite.testcase.length === 0 || !test) { return ""; } const proposal = suggestSimilar(test, testSuite.testcase.map(testcase => testcase.name)); return proposal; }