<commit_before>// test/models/schedule.test.js
import Schedule from '../../src/models/schedule.js'
import {List} from 'immutable'

describe('Schedule', () => {
	let sched = undefined
	beforeEach(() => {
		sched = new Schedule({
			id: 1,
			active: true,
			year: 1994,
			semester: 3,
			index: 2,
			title: 'My Schedule',
			clbids: [123, 234, 345],
		})
	})

	it('is a Schedule', () => {
		expect(sched instanceof Schedule).to.be.true
	})

	it('can be turned into a JS object', () => {
		expect(sched.toJS() instanceof Object).to.be.true
	})

	it('ignores sets on known properties', () => {
		try {
			sched.index = 3
		}
		catch (err) {}
		expect(sched.index).to.equal(2)
	})

	it('uses the ID that you give it', () => {
		expect(sched.id).to.equal(1)
	})
<commit_msg>add a test to schedule<commit_after>// test/models/schedule.test.js
import Schedule from '../../src/models/schedule.js'
import {List} from 'immutable'

describe('Schedule', () => {
	let sched = undefined
	beforeEach(() => {
		sched = new Schedule({
			id: 1,
			active: true,
			year: 1994,
			semester: 3,
			index: 2,
			title: 'My Schedule',
			clbids: [123, 234, 345],
		})
	})

	it('is a Schedule', () => {
		expect(sched instanceof Schedule).to.be.true
	})

	it('can be turned into a JS object', () => {
		expect(sched.toJS() instanceof Object).to.be.true
	})

	it('does not mutate the passed-in object', () => {
		const clbids = []
		const input = {clbids}
		new Schedule(input)
		expect(input.clbids).to.equal(clbids)
	})

	it('ignores sets on known properties', () => {
		try {
			sched.index = 3
		}
		catch (err) {}
		expect(sched.index).to.equal(2)
	})

	it('uses the ID that you give it', () => {
		expect(sched.id).to.equal(1)
	})

{'fraction_non_alphanumeric': 0.18578916715200933, 'fraction_numerical': 0.0221316249271986, 'mean_word_length': 3.1598062953995156, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 16, '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': '898805', 'n_tokens_mistral': 717, 'n_tokens_neox': 621, 'n_words': 158}