Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/cli/cli.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { fileURLToPath } from "node:url";
import { loadOptions, YARGS_PARSER_CONFIG } from "./options.mjs";
import { run, init } from "./commands.mjs";
import pc from "picocolors";
import { logSymbols } from "../utils.js";
import { logSymbols } from "../utils.mjs";

import packageJson from "../../package.json" with { type: "json" };

Expand Down
2 changes: 1 addition & 1 deletion lib/cli/collect-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const debug = require("debug")("mocha:cli:run:helpers");
const { minimatch } = require("minimatch");
const { NO_FILES_MATCH_PATTERN } = require("../error-constants.mjs").constants;
const { lookupFiles } = require("./lookup-files.mjs");
const { castArray } = require("../utils");
const { castArray } = require("../utils.mjs");

/**
* Exports a function that collects test files from CLI parameters.
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const path = require("node:path");
const debug = require("debug")("mocha:cli:config");
const findUp = require("find-up");
const { createUnparsableFileError } = require("../errors.mjs");
const utils = require("../utils");
const utils = require("../utils.mjs");

/**
* These are the valid config files, in order of precedence;
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/options.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
createInvalidArgumentTypeError,
createUnsupportedError,
} from "../errors.mjs";
import { isNumeric } from "../utils.js";
import { isNumeric } from "../utils.mjs";

/**
* The `yargs-parser` namespace
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const { ONE_AND_DONES, ONE_AND_DONE_ARGS } = require("./one-and-dones.mjs");
const debug = require("debug")("mocha:cli:run");
const defaults = require("../mocharc.json");
const { types, aliases } = require("./run-option-metadata.mjs");
const { isCI, logSymbols } = require("../utils");
const { isCI, logSymbols } = require("../utils.mjs");

/**
* Logical option groups
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/watch-run.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const isPathInside = require("is-path-inside");
const { minimatch } = require("minimatch");
const Context = require("../context.mjs").Context;
const collectFiles = require("./collect-files");
const { logSymbols } = require("../utils");
const { logSymbols } = require("../utils.mjs");

/**
* @typedef {import('chokidar').FSWatcher} FSWatcher
Expand Down
2 changes: 1 addition & 1 deletion lib/errors.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { format } from "node:util";
import { constants } from "./error-constants.mjs";
import { isCI } from "./utils.js";
import { isCI } from "./utils.mjs";

/**
* Contains error codes and factory functions to create throwable error objects
Expand Down
2 changes: 1 addition & 1 deletion lib/hook.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Runnable } from "./runnable.mjs";
import utils from "./utils.js";
import * as utils from "./utils.mjs";

const { MOCHA_ID_PROP_NAME } = utils.constants;

Expand Down
2 changes: 1 addition & 1 deletion lib/mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
var { escapeRegExp } = require("./utils/regexp.mjs");
var path = require("node:path");
var builtinReporters = require("./reporters");
var utils = require("./utils");
var utils = require("./utils.mjs");
var mocharc = require("./mocharc.json");
var { Suite } = require("./suite.mjs");
var esmUtils = require("./nodejs/esm-utils");
Expand Down
2 changes: 1 addition & 1 deletion lib/nodejs/parallel-buffered-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const { EVENT_RUN_BEGIN, EVENT_RUN_END } = Runner.constants;
const debug = require("debug")("mocha:parallel:parallel-buffered-runner");
const { BufferedWorkerPool } = require("./buffered-worker-pool");
const { setInterval, clearInterval } = global;
const { createMap, constants } = require("../utils");
const { createMap, constants } = require("../utils.mjs");
const { MOCHA_ID_PROP_NAME } = constants;
const { createFatalError } = require("../errors.mjs");

Expand Down
2 changes: 1 addition & 1 deletion lib/nodejs/serializer.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @typedef {import('../types.d.ts').SerializedWorkerResult} SerializedWorkerResult
*/

import { type, breakCircularDeps } from "../utils.js";
import { type, breakCircularDeps } from "../utils.mjs";
import { createInvalidArgumentTypeError } from "../errors.mjs";
import d from "debug";

Expand Down
2 changes: 1 addition & 1 deletion lib/plugin-loader.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
createInvalidPluginDefinitionError,
createInvalidPluginImplementationError,
} from "./errors.mjs";
import { castArray } from "./utils.js";
import { castArray } from "./utils.mjs";
const debug = debugModule("mocha:plugin-loader");

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/reporters/base.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

import * as diff from "diff";
import milliseconds from "ms";
import utils from "../utils.js";
import * as utils from "../utils.mjs";
import supportsColor from "supports-color";
import Runner from "../runner.js";

Expand Down
2 changes: 1 addition & 1 deletion lib/reporters/doc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

import { Base } from "./base.mjs";
import utils from "../utils.js";
import * as utils from "../utils.mjs";
import Runner from "../runner.js";
var constants = Runner.constants;
var EVENT_TEST_PASS = constants.EVENT_TEST_PASS;
Expand Down
2 changes: 1 addition & 1 deletion lib/reporters/html.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

import { Base } from "./base.mjs";
import utils from "../utils.js";
import * as utils from "../utils.mjs";
import { escapeRegExp } from "../utils/regexp.mjs";
import Runner from "../runner.js";
var constants = Runner.constants;
Expand Down
2 changes: 1 addition & 1 deletion lib/reporters/json.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Base } from "./base.mjs";
import fs from "node:fs";
import path from "node:path";
import * as errors from "../errors.mjs";
import utils from "../utils.js";
import * as utils from "../utils.mjs";
import Runner from "../runner.js";
const createUnsupportedError = errors.createUnsupportedError;
var constants = Runner.constants;
Expand Down
2 changes: 1 addition & 1 deletion lib/reporters/markdown.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

import { Base } from "./base.mjs";
import utils from "../utils.js";
import * as utils from "../utils.mjs";
import Runner from "../runner.js";
var constants = Runner.constants;
var EVENT_RUN_END = constants.EVENT_RUN_END;
Expand Down
2 changes: 1 addition & 1 deletion lib/reporters/xunit.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/

import { Base } from "./base.mjs";
import utils from "../utils.js";
import * as utils from "../utils.mjs";
import fs from "node:fs";
import path from "node:path";
import * as errors from "../errors.mjs";
Expand Down
2 changes: 1 addition & 1 deletion lib/runnable.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { EventEmitter } from "node:events";
import { PendingError } from "./pending.mjs";
import debugModule from "debug";
import milliseconds from "ms";
import utils from "./utils.js";
import * as utils from "./utils.mjs";
import {
createInvalidExceptionError,
createMultipleDoneError,
Expand Down
2 changes: 1 addition & 1 deletion lib/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/
var EventEmitter = require("node:events").EventEmitter;
var { PendingError } = require("./pending.mjs");
var utils = require("./utils");
var utils = require("./utils.mjs");
var debug = require("debug")("mocha:runner");
var { Runnable } = require("./runnable.mjs");
var { Suite } = require("./suite.mjs");
Expand Down
2 changes: 1 addition & 1 deletion lib/suite.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/
import { EventEmitter } from "node:events";
import { Hook } from "./hook.mjs";
import utils from "./utils.js";
import * as utils from "./utils.mjs";
import debugModule from "debug";
import milliseconds from "ms";
import * as errors from "./errors.mjs";
Expand Down
2 changes: 1 addition & 1 deletion lib/test.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Runnable } from "./runnable.mjs";
import utils from "./utils.js";
import * as utils from "./utils.mjs";
import { createInvalidArgumentTypeError } from "./errors.mjs";

const { isString } = utils;
Expand Down
Loading
Loading