Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Commit

Permalink
ms module added instead of internal ms js mochajs#3557 (mochajs#3563)
Browse files Browse the repository at this point in the history
* Replace internal "./ms js" with npm "ms" module (mochajs#3557)
  • Loading branch information
gizemkeser authored and plroebuck committed Nov 23, 2018
1 parent c83f376 commit c342be7
Show file tree
Hide file tree
Showing 8 changed files with 123 additions and 175 deletions.
96 changes: 0 additions & 96 deletions lib/ms.js

This file was deleted.

4 changes: 2 additions & 2 deletions lib/reporters/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

var tty = require('tty');
var diff = require('diff');
var ms = require('../ms');
var milliseconds = require('ms');
var utils = require('../utils');
var supportsColor = process.browser ? null : require('supports-color');

Expand Down Expand Up @@ -367,7 +367,7 @@ Base.prototype.epilogue = function() {
color('green', ' %d passing') +
color('light', ' (%s)');

console.log(fmt, stats.passes || 0, ms(stats.duration));
console.log(fmt, stats.passes || 0, milliseconds(stats.duration));

// pending
if (stats.pending) {
Expand Down
2 changes: 1 addition & 1 deletion lib/runnable.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
var EventEmitter = require('events').EventEmitter;
var Pending = require('./pending');
var debug = require('debug')('mocha:runnable');
var milliseconds = require('./ms');
var milliseconds = require('ms');
var utils = require('./utils');

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/suite.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var Hook = require('./hook');
var utils = require('./utils');
var inherits = utils.inherits;
var debug = require('debug')('mocha:suite');
var milliseconds = require('./ms');
var milliseconds = require('ms');

/**
* Expose `Suite`.
Expand Down
120 changes: 117 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@
"he": "1.1.1",
"minimatch": "3.0.4",
"mkdirp": "0.5.1",
"ms": "2.1.1",
"supports-color": "5.4.0"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit c342be7

Please sign in to comment.