mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-01-14 16:47: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 'findConvexHull' that finds the convex hull of a set of 2D points using the Monotone Chain algorithm.
|
// Write an async JavaScript function 'findConvexHull' that finds the convex hull of a set of 2D points using the Monotone Chain algorithm.
|
||||||
// - The function must accept an array of points, e.g., [{x: 0, y: 3}, {x: 1, y: 1}, ...].
|
// - The function must accept an array of points, e.g., [{x: 0, y: 3}, {x: 1, y: 1}, ...].
|
||||||
@@ -6,7 +6,7 @@ module.exports = {
|
|||||||
// - The function should return an array of points representing the convex hull, ordered clockwise.
|
// - The function should return an array of points representing the convex hull, ordered clockwise.
|
||||||
`,
|
`,
|
||||||
harness: `
|
harness: `
|
||||||
const assert = require('assert');
|
import assert from 'assert';
|
||||||
async function runTest() {
|
async function runTest() {
|
||||||
const points = [
|
const points = [
|
||||||
{x: 0, y: 3}, {x: 1, y: 1}, {x: 2, y: 2}, {x: 4, y: 4},
|
{x: 0, y: 3}, {x: 1, y: 1}, {x: 2, y: 2}, {x: 4, y: 4},
|
||||||
|
|||||||
Reference in New Issue
Block a user