mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-01-14 00:27:55 +00:00
Refactor: Convert test definition to ES Module
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
module.exports = {
|
export default {
|
||||||
prompt: `
|
prompt: `
|
||||||
// Write an async JavaScript function 'findShortestPath' that finds the shortest path in a weighted, undirected graph using Dijkstra's algorithm.
|
// Write an async JavaScript function 'findShortestPath' that finds the shortest path in a weighted, undirected graph using Dijkstra's algorithm.
|
||||||
// - The function must accept a graph, a start node, and an end node.
|
// - The function must accept a graph, a start node, and an end node.
|
||||||
@@ -7,7 +7,7 @@ module.exports = {
|
|||||||
// - Graph format: { 'A': { 'B': 1, 'C': 4 }, 'B': { ... }, ... }
|
// - Graph format: { 'A': { 'B': 1, 'C': 4 }, 'B': { ... }, ... }
|
||||||
`,
|
`,
|
||||||
harness: `
|
harness: `
|
||||||
const assert = require('assert');
|
import assert from 'assert';
|
||||||
async function runTest() {
|
async function runTest() {
|
||||||
const graph = {
|
const graph = {
|
||||||
A: { B: 2, C: 5 },
|
A: { B: 2, C: 5 },
|
||||||
|
|||||||
Reference in New Issue
Block a user