Can you write tests for this class ? import { v4 } from 'uuid';
import { NAME_1 } from '../NAME_1/NAME_1';

export abstract class DiscardPile {
  id = v4();
  cards: NAME_1[];
  foundation: NAME_1;

  constructor(foundation: number) {
    this.foundation = new NAME_1(foundation);
  }

  addCard(NAME_1: NAME_1): void {
    if (this.checkCard(NAME_1)) {
      this.cards.push(NAME_1);
    }
  }

  getLastCard(): NAME_1 {
    return this.cards.length > 0
      ? this.cards[this.cards.length - 1]
      : this.foundation;
  }

  abstract checkCard(NAME_1: NAME_1);
}

export class AscendingDiscardPile extends DiscardPile {
  checkCard(NAME_1: NAME_1) {
    const lastCard = this.getLastCard().value;
    return lastCard < NAME_1.value || lastCard - 10 === NAME_1.value;
  }
} The class will be on a nestjs app

export class DescendingDiscardPile extends DiscardPile {
  checkCard(NAME_1: NAME_1) {
    const lastCard = this.getLastCard().value;
    return lastCard > NAME_1.value || lastCard + 10 === NAME_1.value;
  }
}