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");
const { sortTemplates } = require("../src/generate-template-module-connector");
import * as assert from "assert";
import { sortTemplates } from "../src/generate-template-module-connector.js";
describe("sort", function () {
it("purely static comes before dynamic routes", function () {
assert.deepStrictEqual(

View File

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