File tree Expand file tree Collapse file tree 5 files changed +10
-12
lines changed
Expand file tree Collapse file tree 5 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 77 * file that was distributed with this source code.
88 */
99
10- import ms from 'ms '
10+ import string from '@poppinss/string '
1111import { ErrorsPrinter } from '@japa/errors-printer'
1212
1313import { type Emitter , type Runner } from '../main.js'
@@ -85,7 +85,7 @@ export abstract class BaseReporter {
8585 } ,
8686 {
8787 key : colors . dim ( 'Time' ) ,
88- value : colors . dim ( ms ( summary . duration ) ) ,
88+ value : colors . dim ( string . milliseconds . format ( summary . duration ) ) ,
8989 } ,
9090 ]
9191 } )
Original file line number Diff line number Diff line change 4242 "@poppinss/ts-exec" : " ^1.4.1" ,
4343 "@release-it/conventional-changelog" : " ^10.0.3" ,
4444 "@types/chai" : " ^5.2.3" ,
45- "@types/ms" : " ^2.1.0" ,
4645 "@types/node" : " ^25.0.1" ,
4746 "c8" : " ^10.1.3" ,
4847 "chai" : " ^6.2.1" ,
4948 "cross-env" : " ^10.1.0" ,
5049 "del-cli" : " ^7.0.0" ,
5150 "eslint" : " ^9.39.2" ,
52- "glob" : " ^13.0.0" ,
5351 "prettier" : " ^3.7.4" ,
5452 "release-it" : " ^19.1.0" ,
5553 "serialize-error" : " ^12.0.0" ,
6664 "fast-glob" : " ^3.3.3" ,
6765 "find-cache-directory" : " ^6.0.0" ,
6866 "getopts" : " ^2.3.0" ,
69- "ms" : " ^2.1.3" ,
70- "slash" : " ^5.1.0" ,
7167 "supports-color" : " ^10.2.2"
7268 },
7369 "homepage" : " https://github.com/japa/runner#readme" ,
Original file line number Diff line number Diff line change 77 * file that was distributed with this source code.
88 */
99
10- import slash from 'slash '
10+ import string from '@poppinss/string '
1111import fastGlob from 'fast-glob'
1212import { pathToFileURL } from 'node:url'
1313import type { TestFiles } from './types.js'
@@ -47,7 +47,7 @@ export class FilesManager {
4747 */
4848 grep ( files : URL [ ] , filters : string [ ] ) : URL [ ] {
4949 return files . filter ( ( file ) => {
50- const filename = slash ( file . pathname )
50+ const filename = string . toUnixSlash ( file . pathname )
5151 const filenameWithoutTestSuffix = filename . replace ( FILE_SUFFIX_EXPRESSION , '' )
5252
5353 return ! ! filters . find ( ( filter ) => {
Original file line number Diff line number Diff line change 77 * file that was distributed with this source code.
88 */
99
10- import slash from 'slash'
1110import { relative } from 'node:path'
11+ import string from '@poppinss/string'
1212import { stripVTControlCharacters } from 'node:util'
1313import { ErrorsPrinter } from '@japa/errors-printer'
1414import { BaseReporter } from '../../modules/core/main.js'
@@ -80,7 +80,7 @@ export class GithubReporter extends BaseReporter {
8080 return this . formatMessage ( {
8181 command : 'error' ,
8282 properties : {
83- file : slash ( relative ( process . cwd ( ) , mainFrame . fileName ! ) ) ,
83+ file : string . toUnixSlash ( relative ( process . cwd ( ) , mainFrame . fileName ! ) ) ,
8484 title : error . title ,
8585 line : String ( mainFrame . lineNumber ! ) ,
8686 column : String ( mainFrame . columnNumber ! ) ,
Original file line number Diff line number Diff line change 77 * file that was distributed with this source code.
88 */
99
10- import ms from 'ms '
10+ import string from '@poppinss/string '
1111import { relative } from 'node:path'
1212
1313import { colors , icons } from '../helpers.js'
@@ -117,7 +117,9 @@ export class SpecReporter extends BaseReporter {
117117 const message = this . #getTestMessage( payload )
118118 const prefix = payload . isPinned ? colors . yellow ( '[PINNED] ' ) : ''
119119 const indentation = this . currentFileName || this . currentGroupName ? ' ' : ''
120- const duration = colors . dim ( `(${ ms ( Number ( payload . duration . toFixed ( 2 ) ) ) } )` )
120+ const duration = colors . dim (
121+ `(${ string . milliseconds . format ( Number ( payload . duration . toFixed ( 2 ) ) ) } )`
122+ )
121123 const retries =
122124 payload . retryAttempt && payload . retryAttempt > 1
123125 ? colors . dim ( `(x${ payload . retryAttempt } ) ` )
You can’t perform that action at this time.
0 commit comments