<commit_before>// Tests for the map model.

"use strict";
define([
  'QUnit',
  'map_model'
],
function(QUnit, MapModel) {
  var run = function() {
    test('hello world', function(assert) {
      assert.equal(1, 1, 'It works!');
    });
    test('storing list of rooms', function(assert) {
      var roomData = [
        { key: 'A', x: -2, y:  0, width: 1, height: 2, wall_features : [] },
        { key: 'B', x:  2, y: -2, width: 4, height: 1, wall_features : [] }
      ];

      var model = new MapModel();
      model.setRooms(roomData);

      assert.equal(roomData, model.rooms);
    });

    QUnit.module('Exits');
    test('south', function(assert) {

      var door = { direction: 'south', x: 0, y: 1 };
      var north = { x: 0, y: 0, width: 2, height: 2, wall_features : [door] };
      var south = { x: 0, y: 2, width: 2, height: 2, wall_features : [] };
      var roomData = [];

      var model = new MapModel();
      model.setRooms([north, south]);<commit_msg>Remove 'hello world' test<commit_after>// Tests for the map model.

"use strict";
define([
  'QUnit',
  'map_model'
],
function(QUnit, MapModel) {
  var run = function() {
    test('storing list of rooms', function(assert) {
      var roomData = [
        { key: 'A', x: -2, y:  0, width: 1, height: 2, wall_features : [] },
        { key: 'B', x:  2, y: -2, width: 4, height: 1, wall_features : [] }
      ];

      var model = new MapModel();
      model.setRooms(roomData);

      assert.equal(roomData, model.rooms);
    });

    QUnit.module('Exits');
    test('south', function(assert) {

      var door = { direction: 'south', x: 0, y: 1 };
      var north = { x: 0, y: 0, width: 2, height: 2, wall_features : [door] };
      var south = { x: 0, y: 2, width: 2, height: 2, wall_features : [] };
      var roomData = [];

      var model = new MapModel();
      model.setRooms([north, south]);
{'fraction_non_alphanumeric': 0.18176972281449894, 'fraction_numerical': 0.02025586353944563, 'mean_word_length': 2.568441064638783, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7339920', 'n_tokens_mistral': 697, 'n_tokens_neox': 651, 'n_words': 197}