Skip to content

Commit

Permalink
conditionally add no-experimental-strip-types
Browse files Browse the repository at this point in the history
  • Loading branch information
W-A-James committed Jan 29, 2025
1 parent a0a7e13 commit 4a9c4f7
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 20 deletions.
27 changes: 27 additions & 0 deletions .mocharc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
'use strict';


const nodeOptions = ["experimental-vm-modules"];
const [major, _minor, _patch] = process.versions.node.split('.');
if (Number(major) >= 23) {
nodeOptions.push('no-experimental-strip-types');
}

module.exports =
{
$schema: "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/mocharc.json",
require: [
"source-map-support/register",
"ts-node/register"
],
extension: [
"js",
"ts"
],
recursive: true,
timeout: 10000,
failZero: true,
sort: true,
color: true,
"node-option": nodeOptions
}
20 changes: 0 additions & 20 deletions .mocharc.json

This file was deleted.

0 comments on commit 4a9c4f7

Please # to comment.