/test/cell.ts
import { assert } from 'chai'; import '../src/mapview'; // for some reason this allows this to work correctly import { Cell } from '../src/cell'; import { GameEvent } from '../src/event'; describe('Cell', function() { it('should have a valid id', function() { const e = new Cell(0, 0); assert.isString(e.id); }); it('should store and load', function() { const c1 = new Cell(0, 0); c1.title = 'a room'; c1.description = "it's a room"; c1.navigable = true; c1.addEvent(new GameEvent()); const obj = c1.store(); const c2 = new Cell(0, 0); c2.load(obj); assert.deepEqual(c1, c2); }); });