brain backup 2026-09-14
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { classifyUnit, roleForPdf, isGradeThreeSource } from '../src/catalog.mjs';
|
||||
|
||||
test('keeps a Grade 3 unit from the verified source list', () => {
|
||||
assert.equal(isGradeThreeSource({ title: 'Grade 3 CK Math: Unit 1', filename: 'CKMath_G3U1.zip' }), true);
|
||||
assert.equal(isGradeThreeSource({ title: 'Grade 2 CK Math: Unit 1', filename: 'CKMath_G2U1.zip' }), false);
|
||||
});
|
||||
|
||||
test('classifies major Grade 3 curriculum families', () => {
|
||||
assert.equal(classifyUnit('CKMath_G3U1_IntroducingMultiplication.zip'), 'Math');
|
||||
assert.equal(classifyUnit('CKSci_G3_U1_InvestigatingForces.zip'), 'Science');
|
||||
assert.equal(classifyUnit('CKLA_G3_Unit-1.zip'), 'Language Arts');
|
||||
assert.equal(classifyUnit('CKHG_G3_U1_WorldRivers.zip'), 'History & Geography');
|
||||
});
|
||||
|
||||
test('labels teacher guides and student resources without exposing arbitrary paths', () => {
|
||||
assert.equal(roleForPdf('CKMath_G3U1_IntroducingMultiplication_TG_W2.pdf'), 'Teacher Guide');
|
||||
assert.equal(roleForPdf('CKMath_G3U1_IntroducingMultiplication_SR_W2.pdf'), 'Student Reader');
|
||||
assert.equal(roleForPdf('CoreKnowledge_CurriculumSeries_CCL_TermsOfUse_2024_W1.pdf'), 'Reference');
|
||||
});
|
||||
Reference in New Issue
Block a user