<commit_before>import { expect } from 'chai'
import { encodeStudent } from '../encode-student'

let oldEncode = global.encodeURIComponent

let before = global.before || global.beforeAll
let after = global.after || global.afterAll

describe('prepareStudentForSave', () => {
	beforeAll(() => {
		global.encodeURIComponent = require('querystring').stringify
	})
	afterAll(() => {
		global.encodeURIComponent = oldEncode
	})

	it('encodes a student', () => {
		expect(encodeStudent({ name: 's' })).to.equal('')
	})
})<commit_msg>port encode-student tests away from chai<commit_after>import { encodeStudent } from '../encode-student'

const newEncode = require('querystring').stringify
const oldEncode = global.encodeURIComponent

describe('prepareStudentForSave', () => {
	beforeAll(() => {
		global.encodeURIComponent = newEncode
	})
	afterAll(() => {
		global.encodeURIComponent = oldEncode
	})

	it('encodes a student', () => {
		expect(encodeStudent({ name: 's' })).toBe('')
	})
})
{'fraction_non_alphanumeric': 0.16819571865443425, 'fraction_numerical': 0.0, 'mean_word_length': 5.099378881987578, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '6438180', 'n_tokens_mistral': 305, 'n_tokens_neox': 304, 'n_words': 62}