Skip to content

Commit

Permalink
Minor fixes in class tests
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeneWWolf committed Sep 27, 2023
1 parent 5100704 commit e768aeb
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions rpgsaga/saga/tests/pig.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down

0 comments on commit e768aeb

Please sign in to comment.