From e768aebfa72221ca7b655719763de8338460f556 Mon Sep 17 00:00:00 2001 From: Demonage Date: Wed, 27 Sep 2023 17:41:02 +0300 Subject: [PATCH] Minor fixes in class tests --- rpgsaga/saga/tests/pig.spec.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/rpgsaga/saga/tests/pig.spec.ts b/rpgsaga/saga/tests/pig.spec.ts index e2ba9f1..e0ea1a8 100644 --- a/rpgsaga/saga/tests/pig.spec.ts +++ b/rpgsaga/saga/tests/pig.spec.ts @@ -2,15 +2,13 @@ import { Pig } from '../src/pig'; describe('Testing pig constructor', () => { it('Pig should be created', () => { - const first = new Pig(500, "DIV69"); + const pig = new Pig(500, "DIV69"); + expect(pig.mass).toEqual(500); + expect(pig.identificator).toEqual("DIV69"); }); it('Pig with invalid mass', () => { expect(() => new Pig(10, "RIP38")).toThrow(Error("Pig's mass should be 50 kg or bigger.")); }); - it('Pig identificator should be assigned', () => { - const pig = new Pig(100, "REZ27"); - expect(pig.identificator).toEqual("REZ27"); - }); }); describe('Testing pig methods', () => {