Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

unify-mocha-output

dword-design320MIT2.0.22

Adjusts a Mocha output so that it is consistent across platforms and can be used for snapshot testing. Basically adjusts the checkmark symbol and removes time values.

milliseconds

readme

unify-mocha-output

npm version Linux macOS Windows compatible Build status Coverage status Dependency status Renovate enabled
Open in Gitpod Buy Me a Coffee PayPal Patreon

Adjusts a Mocha output so that it is consistent across platforms and can be used for snapshot testing. Basically adjusts the checkmark symbol and removes time values.

Install

# npm
$ npm install unify-mocha-output

# Yarn
$ yarn add unify-mocha-output

Usage

import unifyMochaOutput from 'unify-mocha-output'

console.log(unifyMochaOutput(
`index
    √ test1
    √ test2


  2 passing (7ms)

`
))

/*
index
    ✓ test1
    ✓ test2


  2 passing

`/

Contribute

Are you missing something or want to contribute? Feel free to file an issue or a pull request! ⚙️

Support

Hey, I am Sebastian Landwehr, a freelance web developer, and I love developing web apps and open source packages. If you want to support me so that I can keep packages up to date and build more helpful tools, you can donate here:

Buy Me a Coffee  If you want to send me a one time donation. The coffee is pretty good 😊.
PayPal  Also for one time donations if you like PayPal.
Patreon  Here you can support me regularly, which is great so I can steadily work on projects.

Thanks a lot for your support! ❤️

See also

  • output-files: Output a tree of files and directories by providing an object. Especially useful for testing with real files.
  • with-local-tmp-dir: Creates a temporary folder inside cwd, cds inside the folder, runs a function, and removes the folder. Especially useful for testing.
  • expect-mocha-image-snapshot: A wrapper around jest-image-snapshot that makes it compatible to Mocha.
  • jest-image-matcher: A Jest matcher for image comparisons based on pixelmatch. Can also be used with Mocha. Useful for visual regression testing.
  • mock-argv: Temporarily overrides the command line arguments. This is useful for testing.

License

MIT License © Sebastian Landwehr

changelog

2.0.22 (2023-05-13)

Bug Fixes

  • update dependency @dword-design/functions to v4.1.7 (1962bff)

2.0.21 (2023-04-10)

Bug Fixes

  • update dependency @dword-design/tester to v2.0.16 (d381f92)

2.0.20 (2023-04-09)

Bug Fixes

  • update dependency @dword-design/tester to v2.0.13 (0311626)

2.0.19 (2023-04-09)

Bug Fixes

  • update dependency fs-extra to v11.1.1 (867aaa7)

2.0.18 (2023-03-19)

Bug Fixes

  • update dependency @dword-design/tester-plugin-tmp-dir to v2.1.18 (81d0276)

2.0.17 (2023-03-19)

Bug Fixes

  • update dependency @dword-design/tester-plugin-tmp-dir to v2.1.17 (137d367)

2.0.16 (2023-03-19)

Bug Fixes

  • update dependency @dword-design/tester-plugin-tmp-dir to v2.1.16 (549b7c7)

2.0.15 (2023-03-19)

Bug Fixes

  • update dependency @dword-design/tester-plugin-tmp-dir to v2.1.15 (9498e4c)

2.0.14 (2023-03-18)

Bug Fixes

  • update dependency @dword-design/tester-plugin-tmp-dir to v2.1.14 (46554e2)

2.0.13 (2023-03-18)

Bug Fixes

  • update dependency @dword-design/tester-plugin-tmp-dir to v2.1.13 (f2445bc)

2.0.12 (2023-03-16)

Bug Fixes

  • update dependency @dword-design/tester-plugin-tmp-dir to v2.1.12 (c6af0ed)

2.0.11 (2023-03-15)

Bug Fixes

  • update dependency execa to v7.1.1 (00e2661)

2.0.10 (2023-03-15)

Bug Fixes

  • update dependency @dword-design/tester-plugin-tmp-dir to v2.1.10 (08785aa)

2.0.9 (2023-02-15)

Bug Fixes

2.0.8 (2023-01-06)

Bug Fixes

2.0.7 (2021-07-20)

Bug Fixes

2.0.6 (2021-07-06)

Bug Fixes

2.0.5 (2021-06-29)

Bug Fixes

2.0.4 (2021-06-14)

Bug Fixes

2.0.3 (2021-06-09)

Bug Fixes

2.0.2 (2021-05-28)

Bug Fixes

2.0.1 (2021-05-03)

Bug Fixes

  • update dependency @dword-design/functions to v4 (#15) (36599f2)

2.0.0 (2021-05-03)

Bug Fixes

  • update dependency @dword-design/base to v8 (#14) (c64c8d2)

BREAKING CHANGES

  • require Node.js >= 12

Co-authored-by: Renovate Bot bot@renovateapp.com Co-authored-by: Sebastian Landwehr info@dword-design.de Co-authored-by: GitHub Actions actions@github.com

1.0.7 (2021-04-12)

Bug Fixes

1.0.6 (2021-03-31)

Bug Fixes

1.0.5 (2021-03-23)

Bug Fixes

  • update dependency @dword-design/functions to v3 (#5) (487ca2c)

1.0.4 (2021-03-22)

Bug Fixes

1.0.3 (2021-03-22)

Bug Fixes

1.0.2 (2021-03-22)

Bug Fixes

1.0.1 (2021-03-17)

Bug Fixes

1.0.0 (2021-03-14)

Bug Fixes

  • adjust description and keywords (4a14c97)

Features