5.4.4 • Published 5 months ago

@adaliszk/typescript-testing v5.4.4

Weekly downloads
-
License
BSD-2-Clause
Repository
github
Last release
5 months ago

Meta-Package for testing Typescript with Vitest

Provides

  • @testdeck/vitest
  • vitest
  • chai

Usage

  • Install the package pnpm install -D @adaliszk/typescript-testing vitest
  • Add a vitest config:

    import { defineConfig } from '@adaliszk/typescript-testing'
    
    export default defineConfig({
        test: {
            // ...
        },
    })
  • Add a script to run the tests and collect the coverage:

    "scripts": {
      "test": "vitest",
      "test:ui": "vitest --ui",
      "coverage": "vitest run --coverage"
    }

Furthermore, this package is a facade for the provided packages where each export is available on the default output, or you can use them as namespace like testdeck and chai.

For example, what normally looks like:

describe('MyModule', () =>
{
    it('should be able to import', () =>
    {
        import() /* ... */
    })
})

Can be written with testdeck:

import { describe, it } from '@adaliszk/typescript-testing'

@describe
class MyModule
{
    @it
    'should be able to import' ()
    {
        import() /* ... */
    }
}

Versioning

Since this is a meta-package, the versioning reflect its main provided package, in this case typescript. However, only the Major and Minor versions are kept in sync. The Patch is used to bump the meta-package.

5.4.4

5 months ago

5.4.2

7 months ago

5.4.1

7 months ago

5.4.3

7 months ago

5.2.3

11 months ago

5.2.2

11 months ago

5.2.1

1 year ago

5.1.1

1 year ago

5.1.0

1 year ago

5.0.2

1 year ago

5.0.1

2 years ago

4.9.10

2 years ago

4.9.8

2 years ago

4.9.7

2 years ago

4.9.6

2 years ago

4.9.4

2 years ago

4.9.3

2 years ago

4.9.5

2 years ago

4.9.2

2 years ago

4.9.1

2 years ago

27.4.15

3 years ago

27.4.13

3 years ago

27.4.12

3 years ago

27.4.11

3 years ago