mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-01-13 16:17:54 +00:00
Refactor: Convert test definition to ES Module
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
module.exports = {
|
||||
export default {
|
||||
prompt: `
|
||||
// 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.
|
||||
@@ -7,7 +7,7 @@ module.exports = {
|
||||
// - Graph format: { 'A': { 'B': 1, 'C': 4 }, 'B': { ... }, ... }
|
||||
`,
|
||||
harness: `
|
||||
const assert = require('assert');
|
||||
import assert from 'assert';
|
||||
async function runTest() {
|
||||
const graph = {
|
||||
A: { B: 2, C: 5 },
|
||||
|
||||
Reference in New Issue
Block a user