您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

plugin-version-feature.spec.ts 801B

1234567891011121314151617181920212223242526
  1. import { isSupportMCP } from './plugin-version-feature'
  2. describe('plugin-version-feature', () => {
  3. beforeEach(() => {
  4. jest.clearAllMocks()
  5. })
  6. describe('isSupportMCP', () => {
  7. it('should call isEqualOrLaterThanVersion with the correct parameters', () => {
  8. expect(isSupportMCP('0.0.3')).toBe(true)
  9. expect(isSupportMCP('1.0.0')).toBe(true)
  10. })
  11. it('should return true when version is equal to the supported MCP version', () => {
  12. const mockVersion = '0.0.2'
  13. const result = isSupportMCP(mockVersion)
  14. expect(result).toBe(true)
  15. })
  16. it('should return false when version is less than the supported MCP version', () => {
  17. const mockVersion = '0.0.1'
  18. const result = isSupportMCP(mockVersion)
  19. expect(result).toBe(false)
  20. })
  21. })
  22. })