Use ESM for mocha tests.

This commit is contained in:
Dillon Kearns 2023-01-24 15:59:53 -08:00
parent 8978ed1ac9
commit 7ef56571bf
2 changed files with 6 additions and 7 deletions

View File

@ -1,5 +1,6 @@
var assert = require("assert"); import * as assert from "assert";
const { sortTemplates } = require("../src/generate-template-module-connector");
import { sortTemplates } from "../src/generate-template-module-connector.js";
describe("sort", function () { describe("sort", function () {
it("purely static comes before dynamic routes", function () { it("purely static comes before dynamic routes", function () {
assert.deepStrictEqual( assert.deepStrictEqual(

View File

@ -1,8 +1,6 @@
var assert = require("assert"); import * as assert from "assert";
const {
toPathPattern, import { toPathPattern, toPathPatterns } from "../src/route-codegen-helpers.js";
toPathPatterns,
} = require("../src/route-codegen-helpers.js");
describe("toPathPattern", function () { describe("toPathPattern", function () {
it("index is normalized", function () { it("index is normalized", function () {