5.4.3 • Published 8 days ago

@adaliszk/typescript-testing v5.4.3

Weekly downloads
-
License
BSD-2-Clause
Repository
github
Last release
8 days 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.2

8 days ago

5.4.1

8 days ago

5.4.3

8 days ago

5.2.3

4 months ago

5.2.2

4 months ago

5.2.1

8 months ago

5.1.1

8 months ago

5.1.0

8 months ago

5.0.2

10 months ago

5.0.1

1 year ago

4.9.10

1 year ago

4.9.8

1 year ago

4.9.7

1 year ago

4.9.6

1 year ago

4.9.4

1 year ago

4.9.3

1 year ago

4.9.5

1 year ago

4.9.2

1 year ago

4.9.1

1 year ago

27.4.15

2 years ago

27.4.13

2 years ago

27.4.12

2 years ago

27.4.11

2 years ago