neet/refined-itsukara-link

View on GitHub
packages/@neet/vschedule-api/src/domain/entities/performer/performer-name.spec.ts

Summary

Maintainability
A
3 hrs
Test Coverage
import { PerformerName, PerformerNameLengthError } from './performer-name';

describe('PerformerName', () => {
  it('constructs', () => {
    const description = new PerformerName('hello');
    expect(description.value).toBe('hello');
  });

  it('throws and error when description is too long', () => {
    expect(() => {
      new PerformerName('a'.repeat(51));
    }).toThrow(PerformerNameLengthError);
  });
});