firsttris / vscode-jest-runner

Simple way to run or debug one or more tests from context menu, codelens or command plalette
https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner
MIT License
265 stars 124 forks source link

Parameterised test support and deps cleanup #146

Closed tlbdk closed 3 years ago

tlbdk commented 3 years ago
  1. jest-editor-support added support for parameterised test support: https://github.com/jest-community/jest-editor-support/releases/tag/v28.1.0

Example:

describe.each([false, true])('Common (optimize: %s)', optimize => {
  describe('ValidatorBase', () => {
    it(`should validate with the default codeGen implementation with optimize ${optimize}`, () => {
      const validator = new OneValidator({ optimize: optimize })
      expect(validator.validate(1)).toStrictEqual([])
      expect(validator.validate(2)).toStrictEqual([new ValidationFailure(`value is not 1`)])
      expect(validator.validate(null)).toStrictEqual([new RequiredFail(`Is required`)])
    })
  })
})
  1. The npm package vscode is deprecated all pulls other packages with security issues, it has been replaced with type definitions.
firsttris commented 3 years ago

thanks for this contribution, i will create a new version soon

firsttris commented 3 years ago

release in version 0.4.33