Download server/templates.test.js from SSSAssist/Thoth: direct link, hf CLI and curl.
- Browser
- Download file 1.18 kB
-
https://huggingface.co/spaces/SSSAssist/Thoth/resolve/main/server/templates.test.js
- Command line
-
hf download hf://spaces/SSSAssist/Thoth/server/templates.test.js
-
curl -L -o templates.test.js https://huggingface.co/spaces/SSSAssist/Thoth/resolve/main/server/templates.test.js
1.18 kB
| import assert from 'node:assert/strict'; | |
| import { test } from 'node:test'; | |
| import { getTemplate, templateList } from './templates.js'; | |
| test('Anadolu Üniversitesi LEE şablonları kurum grubunda listelenir', () => { | |
| const kurum = templateList().filter((t) => t.group === 'kurum').map((t) => t.id); | |
| assert.deepEqual(kurum, ['anadolu-lee-tez', 'anadolu-lee-donem']); | |
| assert.ok(templateList().filter((t) => t.group === 'genel').length >= 6); | |
| }); | |
| test('LEE şablonları sınıf dosyasını, bölümleri ve logoları içerir', () => { | |
| for (const [id, secenek] of [['anadolu-lee-tez', 'tez'], ['anadolu-lee-donem', 'donem']]) { | |
| const { files, mainFile } = getTemplate(id); | |
| assert.equal(mainFile, 'main.tex'); | |
| assert.match(files['main.tex'], new RegExp(`\\\\documentclass\\[${secenek}\\]\\{anadolu-lee\\}`)); | |
| assert.match(files['anadolu-lee.cls'], /\\ProvidesClass\{anadolu-lee\}/); | |
| assert.equal(typeof files['bolumler/1-giris.tex'], 'string'); | |
| assert.equal(typeof files['kaynakca.bib'], 'string'); | |
| const logo = files['logolar/anadolu-universitesi.png']; | |
| assert.ok(Buffer.isBuffer(logo) && logo.subarray(1, 4).toString() === 'PNG'); | |
| } | |
| }); | |