<commit_before>var mocha = require ('mocha');
var chai = require ('chai');
var Tutorial = require ('../../models/Tutorial');
var chaiAsPromised = require ('chai-as-promised');

var rooms = require ('../../models/Rooms');
chai.use (chaiAsPromised);

var should = chai.should ();
var expect = chai.expect;

var test = function () {
	describe ('Tutorial Model', function () {
		describe ('#findAndCountAllTutorialByUserID()', function () {
			this.timeout (15000);
			it ('should retrive data from database', function (done) {
				setTimeout (done, 15000);
				var queryDatabase = Tutorial.findAndCountAllTutorials ('a0119493');
				return queryDatabase.then (function (result) {
					expect (result.count).to.equal (9);
					done();
				});
			});

		});

		describe ('#forceSyncIVLE()', function () {
			this.timeout (15000);
			it ('should sync data from ivle', function (done) {
				setTimeout (done, 15000);
				var syncIVLE = Tutorial.forceSyncIVLE ('a0119493');
				return syncIVLE.then (function (result) {
					expect (result).to.equal (true);
					done();
				});
			})
		})

		//clean up after all test
		after (function () {
			rooms.getLobby ().removeAllRooms ();
		});
	})


}

module.exports.test = test;<commit_msg>try to pass travis test<commit_after>var mocha = require ('mocha');
var chai = require ('chai');
var Tutorial = require ('../../models/Tutorial');
var chaiAsPromised = require ('chai-as-promised');

var rooms = require ('../../models/Rooms');
chai.use (chaiAsPromised);

var should = chai.should ();
var expect = chai.expect;

var test = function () {
	describe ('Tutorial Model', function () {
		describe ('#findAndCountAllTutorialByUserID()', function () {
			this.timeout (25000);
			it ('should retrive data from database', function (done) {
				setTimeout (done, 25000);
				var queryDatabase = Tutorial.findAndCountAllTutorials ('a0119493');
				return queryDatabase.then (function (result) {
					expect (result.count).to.equal (9);
					done();
				});
			});

		});

		describe ('#forceSyncIVLE()', function () {
			this.timeout (25000);
			it ('should sync data from ivle', function (done) {
				setTimeout (done, 25000);
				var syncIVLE = Tutorial.forceSyncIVLE ('a0119493');
				return syncIVLE.then (function (result) {
					expect (result).to.equal (true);
					done();
				});
			})
		})

		//clean up after all test
		after (function () {
			rooms.getLobby ().removeAllRooms ();
		});
	})


}

module.exports.test = test;
{'fraction_non_alphanumeric': 0.16707218167072183, 'fraction_numerical': 0.028386050283860504, 'mean_word_length': 3.510054844606947, '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': '1991317', 'n_tokens_mistral': 982, 'n_tokens_neox': 788, 'n_words': 207}