Skip to content
Snippets Groups Projects
Select Git revision
  • 94bfb1a0a8dafae90660bd9bc3499c96b61a20a5
  • MCCS-163 default
  • main
  • sar-277-update-docs-with-examples-for-lrc
  • st-946-automate
  • sar_302-log-fix
  • sar-287_subarray_commands_to_lrc
  • sar_302-POC_await_sub_device_state
  • sat_302_fix_pipelines
  • sar-286_lrc_one_subarry_command
  • sar-286_lrc_improvements
  • sar-288-async-controller
  • sar-276-combine-tango-queue
  • sar-255_remove_nexus_reference
  • sar-275-add-LRC
  • sar-273-add-lrc-attributes
  • sar-272
  • sp-1106-marvin-1230525148-ska-tango-base
  • sp-1106-marvin-813091765-ska-tango-base
  • sar-255/Publish-package-to-CAR
  • mccs-661-device-under-test-fixture
  • mccs-659-pep257-docstring-linting
  • 0.11.3
  • 0.11.2
  • 0.11.1
  • 0.11.0
  • 0.10.1
  • 0.10.0
  • 0.9.1
  • 0.9.0
  • 0.8.1
  • 0.8.0
  • 0.7.2
  • 0.7.1
  • 0.7.0
  • 0.6.6
  • 0.6.5
  • 0.6.4
  • 0.6.3
  • 0.6.2
  • 0.6.1
  • 0.6.0
42 results

Makefile

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    Cycle.test.ts 1.94 KiB
    import { describe, it, expect } from 'vitest';
    import Cycle from "../../models/tmss/Cycle";
    
    describe('Cycle Interface', () => {
    
        const cycle: Cycle = {
            name: 'Cycle 1',
            url: 'http://example.com',
            created_at: '2023-01-01T00:00:00Z',
            updated_at: '2023-01-02T00:00:00Z',
            description: 'This is a test cycle.',
            duration: 30,
            project: ['Project 1', 'Project 2'],
            project_ids: ['1', '2'],
            start: '2023-01-01T00:00:00Z',
            stop: '2023-01-31T23:59:59Z',
            tags: ['tag1', 'tag2'],
            quota: ['Quota 1', 'Quota 2'],
            qupta_ids: [1, 2]
          };
          
      it('should have correct structure', () => {
        expect(cycle).toHaveProperty('name');
        expect(cycle).toHaveProperty('url');
        expect(cycle).toHaveProperty('created_at');
        expect(cycle).toHaveProperty('updated_at');
        expect(cycle).toHaveProperty('description');
        expect(cycle).toHaveProperty('duration');
        expect(cycle).toHaveProperty('project');
        expect(cycle).toHaveProperty('project_ids');
        expect(cycle).toHaveProperty('start');
        expect(cycle).toHaveProperty('stop');
        expect(cycle).toHaveProperty('tags');
        expect(cycle).toHaveProperty('quota');
        expect(cycle).toHaveProperty('qupta_ids');
      });
    
      it('should have correct types', () => {
        expect(typeof cycle.name).toBe('string');
        expect(typeof cycle.url).toBe('string');
        expect(typeof cycle.created_at).toBe('string');
        expect(typeof cycle.updated_at).toBe('string');
        expect(typeof cycle.description).toBe('string');
        expect(typeof cycle.duration).toBe('number');
        expect(Array.isArray(cycle.project)).toBe(true);
        expect(Array.isArray(cycle.project_ids)).toBe(true);
        expect(typeof cycle.start).toBe('string');
        expect(typeof cycle.stop).toBe('string');
        expect(Array.isArray(cycle.tags)).toBe(true);
        expect(Array.isArray(cycle.quota)).toBe(true);
        expect(Array.isArray(cycle.qupta_ids)).toBe(true);
      });
    });