math-exercises 3.0.0 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.js +0 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +0 -2
- package/lib/exercises/math/dataRepresentations/index.d.ts +0 -1
- package/lib/exercises/math/dataRepresentations/index.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/index.js +1 -1
- package/lib/exercises/math/powers/powersProduct.d.ts +2 -1
- package/lib/exercises/math/powers/powersProduct.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersProduct.js +15 -4
- package/lib/exercises/math/probaStat/basicStats/calculateFrequency.d.ts +10 -0
- package/lib/exercises/math/probaStat/basicStats/calculateFrequency.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/basicStats/calculateFrequency.js +100 -0
- package/lib/exercises/math/probaStat/basicStats/index.d.ts +2 -0
- package/lib/exercises/math/probaStat/basicStats/index.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/basicStats/index.js +1 -0
- package/lib/exercises/math/probaStat/index.d.ts +1 -0
- package/lib/exercises/math/probaStat/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/index.js +1 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFirstTermsSum.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFirstTermsSum.js +19 -8
- package/lib/exercises/math/sequences/arithmetic/firstIntegersSum.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/firstIntegersSum.js +52 -4
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.js +20 -9
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsSum.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsSum.js +19 -14
- package/lib/index.d.ts +8 -7
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -1
- package/lib/playground.d.ts +1 -1
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +1 -14
- package/lib/tests/exoTest.d.ts +7 -0
- package/lib/tests/exoTest.d.ts.map +1 -0
- package/lib/tests/exoTest.js +46 -0
- package/lib/tests/exosTest.d.ts +3 -0
- package/lib/tests/exosTest.d.ts.map +1 -0
- package/lib/tests/exosTest.js +44 -0
- package/lib/tests/global.test.d.ts +2 -0
- package/lib/tests/global.test.d.ts.map +1 -0
- package/lib/tests/global.test.js +8 -0
- package/lib/tests/latexParser.test.d.ts +2 -0
- package/lib/tests/latexParser.test.d.ts.map +1 -0
- package/lib/tests/latexParser.test.js +51 -0
- package/lib/tests/manyPdfExos.test.d.ts +2 -0
- package/lib/tests/manyPdfExos.test.d.ts.map +1 -0
- package/lib/tests/manyPdfExos.test.js +19 -0
- package/lib/tests/ml.test.d.ts +2 -0
- package/lib/tests/ml.test.d.ts.map +1 -0
- package/lib/tests/ml.test.js +11 -0
- package/lib/tests/multiplySimplify.test.d.ts +2 -0
- package/lib/tests/multiplySimplify.test.d.ts.map +1 -0
- package/lib/tests/multiplySimplify.test.js +32 -0
- package/lib/tests/pdfExo.test.d.ts +2 -0
- package/lib/tests/pdfExo.test.d.ts.map +1 -0
- package/lib/tests/pdfExo.test.js +10 -0
- package/lib/tests/pdfs/buildPDFForExercise.d.ts +3 -0
- package/lib/tests/pdfs/buildPDFForExercise.d.ts.map +1 -0
- package/lib/tests/pdfs/buildPDFForExercise.js +108 -0
- package/lib/tests/pdfs/formatMdToLatex.d.ts +2 -0
- package/lib/tests/pdfs/formatMdToLatex.d.ts.map +1 -0
- package/lib/tests/pdfs/formatMdToLatex.js +9 -0
- package/lib/tests/pdfs/mdCodeToLatex.d.ts +2 -0
- package/lib/tests/pdfs/mdCodeToLatex.d.ts.map +1 -0
- package/lib/tests/pdfs/mdCodeToLatex.js +20 -0
- package/lib/tests/pdfs/mdTableToLatexTabular.d.ts +2 -0
- package/lib/tests/pdfs/mdTableToLatexTabular.d.ts.map +1 -0
- package/lib/tests/pdfs/mdTableToLatexTabular.js +30 -0
- package/lib/tests/pdfs/quizPdfHeader.d.ts +9 -0
- package/lib/tests/pdfs/quizPdfHeader.d.ts.map +1 -0
- package/lib/tests/pdfs/quizPdfHeader.js +44 -0
- package/lib/tests/pdfs/quizPdfPreambule.d.ts +2 -0
- package/lib/tests/pdfs/quizPdfPreambule.d.ts.map +1 -0
- package/lib/tests/pdfs/quizPdfPreambule.js +76 -0
- package/lib/tests/questionTest.d.ts +6 -0
- package/lib/tests/questionTest.d.ts.map +1 -0
- package/lib/tests/questionTest.js +156 -0
- package/lib/tests/simplify.test.d.ts +2 -0
- package/lib/tests/simplify.test.d.ts.map +1 -0
- package/lib/tests/simplify.test.js +32 -0
- package/lib/tests/singleExo.test.d.ts +2 -0
- package/lib/tests/singleExo.test.d.ts.map +1 -0
- package/lib/tests/singleExo.test.js +9 -0
- package/lib/tests/xl.test.d.ts +2 -0
- package/lib/tests/xl.test.d.ts.map +1 -0
- package/lib/tests/xl.test.js +11 -0
- package/package.json +9 -8
- package/lib/server.js.map +0 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export const quizPdfPreambule = () => {
|
|
2
|
+
return `\\documentclass[a4paper, 8pt]{article}
|
|
3
|
+
\\usepackage[dvipsnames]{xcolor}
|
|
4
|
+
\\usepackage[utf8]{inputenc}
|
|
5
|
+
\\usepackage[T1]{fontenc}
|
|
6
|
+
\\usepackage[french]{babel}
|
|
7
|
+
|
|
8
|
+
\\usepackage{arev}
|
|
9
|
+
\\usepackage[left=1cm, right=1cm, top=1cm, bottom=1cm,includehead,includefoot]{geometry}
|
|
10
|
+
\\usepackage{eurosym}
|
|
11
|
+
\\usepackage{amstext}
|
|
12
|
+
\\DeclareRobustCommand{\\officialeuro}{%
|
|
13
|
+
\\ifmmode\\expandafter\\text\\fi
|
|
14
|
+
{\\fontencoding{U}\\fontfamily{eurosym}\\selectfont e}}
|
|
15
|
+
|
|
16
|
+
\\usepackage{robust-externalize}
|
|
17
|
+
\\usepackage{amsmath}
|
|
18
|
+
\\usepackage{multicol}
|
|
19
|
+
\\usepackage{qrcode}
|
|
20
|
+
\\usepackage{listings}
|
|
21
|
+
\\usepackage{hyperref}
|
|
22
|
+
\\usepackage{tikz}
|
|
23
|
+
\\usepackage{amssymb}
|
|
24
|
+
\\usepackage{fancyhdr}
|
|
25
|
+
|
|
26
|
+
\\newenvironment{tightcenter}{%
|
|
27
|
+
\\setlength\\topsep{0pt}
|
|
28
|
+
\\setlength\\parskip{0pt}
|
|
29
|
+
\\begin{center}
|
|
30
|
+
}{%
|
|
31
|
+
\\end{center}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
\\pagestyle{fancy}
|
|
35
|
+
|
|
36
|
+
\\definecolor{codegreen}{rgb}{0,0.6,0}
|
|
37
|
+
\\definecolor{codegray}{rgb}{0.5,0.5,0.5}
|
|
38
|
+
\\definecolor{codepurple}{rgb}{0.58,0,0.82}
|
|
39
|
+
\\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
|
|
40
|
+
|
|
41
|
+
\\lstdefinestyle{mystyle}{
|
|
42
|
+
backgroundcolor=\\color{backcolour},
|
|
43
|
+
commentstyle=\\color{codegreen},
|
|
44
|
+
keywordstyle=\\color{magenta},
|
|
45
|
+
numberstyle=\\tiny\\color{codegray},
|
|
46
|
+
stringstyle=\\color{codepurple},
|
|
47
|
+
basicstyle=\\footnotesize,
|
|
48
|
+
breakatwhitespace=false,
|
|
49
|
+
breaklines=true,
|
|
50
|
+
captionpos=b,
|
|
51
|
+
keepspaces=true,
|
|
52
|
+
numbers=left,
|
|
53
|
+
numbersep=5pt,
|
|
54
|
+
showspaces=false,
|
|
55
|
+
showstringspaces=false,
|
|
56
|
+
showtabs=false,
|
|
57
|
+
tabsize=2,
|
|
58
|
+
xleftmargin=2em
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
\\setlength\\parindent{0pt}
|
|
62
|
+
\\setlength{\\columnseprule}{0.5pt}
|
|
63
|
+
\\lstset{style=mystyle}
|
|
64
|
+
|
|
65
|
+
\\newenvironment{correctionColored}{\\par\\color{RoyalBlue}}{\\par}
|
|
66
|
+
|
|
67
|
+
\\begin{document}
|
|
68
|
+
\\lstset{language=Python}
|
|
69
|
+
%\\fancyhead{}
|
|
70
|
+
%\\fancyfoot{}
|
|
71
|
+
\\renewcommand{\\headrulewidth}{0pt}
|
|
72
|
+
\\renewcommand{\\footrulewidth}{0.4pt}
|
|
73
|
+
\\renewcommand{\\footruleskip}{2pt}
|
|
74
|
+
|
|
75
|
+
`;
|
|
76
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"questionTest.d.ts","sourceRoot":"","sources":["../../src/tests/questionTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAIjE,eAAO,MAAM,YAAY,QAAS,QAAQ,YAAY,QAAQ;;;CAkK7D,CAAC"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { latexTester } from "../latexTester.js";
|
|
2
|
+
import { formatMarkdownToLatex } from "./pdfs/formatMdToLatex.js";
|
|
3
|
+
export const questionTest = (exo, question) => {
|
|
4
|
+
let qcmTime = -1;
|
|
5
|
+
let veaTime = -1;
|
|
6
|
+
if (exo.hasHintAndCorrection) {
|
|
7
|
+
if (!question.hint?.length) {
|
|
8
|
+
throw new Error(`exo ${exo.id} has no hint`);
|
|
9
|
+
}
|
|
10
|
+
const formatedHint = formatMarkdownToLatex(question.hint);
|
|
11
|
+
if (!latexTester(formatedHint)) {
|
|
12
|
+
throw new Error(`exo ${exo.id} has invalid hint`);
|
|
13
|
+
}
|
|
14
|
+
if (!question.correction?.length) {
|
|
15
|
+
throw new Error(`exo ${exo.id} has no correction`);
|
|
16
|
+
}
|
|
17
|
+
const formatedCorrection = formatMarkdownToLatex(question.correction);
|
|
18
|
+
if (!latexTester(formatedCorrection)) {
|
|
19
|
+
throw new Error(`exo ${exo.id} has invalid correction`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
if (question.hint || question.correction) {
|
|
23
|
+
if (!exo.hasHintAndCorrection) {
|
|
24
|
+
throw new Error(`exo ${exo.id} has hint or correction but not hasHintAndCorr`);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
if (!question.identifiers)
|
|
28
|
+
throw new Error(`exo ${exo.id} has no identifiers`);
|
|
29
|
+
const dotDecimalPattern = /\d+\.\d+/;
|
|
30
|
+
if (question.studentGgbOptions?.coords?.length) {
|
|
31
|
+
if (exo.answerType !== "GGB") {
|
|
32
|
+
throw new Error(`exo ${exo.id} has studentGgbOptions but answerType is not GGB`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
if (exo.answerType === "GGB") {
|
|
36
|
+
if (!question.ggbAnswer?.length)
|
|
37
|
+
throw new Error(`exo ${exo.id} has no ggbAnswer`);
|
|
38
|
+
if (!question.studentGgbOptions?.coords?.length)
|
|
39
|
+
throw new Error(`exo ${exo.id} has no studentGgbOptions Coords`);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
if (!question.answer)
|
|
43
|
+
throw new Error(`exo ${exo.id} has no answer`);
|
|
44
|
+
}
|
|
45
|
+
if (question.answer) {
|
|
46
|
+
if (question.answer.match(dotDecimalPattern))
|
|
47
|
+
throw new Error(`exo ${exo.id} has invalid number format`);
|
|
48
|
+
if (question.answer.includes("[object Object]"))
|
|
49
|
+
throw new Error(`exo ${exo.id} has invalid answer`);
|
|
50
|
+
if (question.answerFormat !== "raw") {
|
|
51
|
+
if (!latexTester(question.answer, true))
|
|
52
|
+
throw new Error(`exo ${exo.id} has invalid answer`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
if (!question.instruction.length) {
|
|
56
|
+
throw new Error(`exo ${exo.id} has no instruction`);
|
|
57
|
+
}
|
|
58
|
+
if (question.instruction.includes("[object Object]")) {
|
|
59
|
+
throw new Error(`exo ${exo.id} has invalid instruction`);
|
|
60
|
+
}
|
|
61
|
+
const imgRegex = /!\[.*?\]\((.*?)\)/g;
|
|
62
|
+
const matches = question.instruction.matchAll(imgRegex);
|
|
63
|
+
for (const match of matches) {
|
|
64
|
+
question.instruction = question.instruction.replace(match[0], ``);
|
|
65
|
+
}
|
|
66
|
+
const formatedInstruction = formatMarkdownToLatex(question.instruction);
|
|
67
|
+
if (!latexTester(formatedInstruction)) {
|
|
68
|
+
throw new Error(`exo ${exo.id} has invalid instruction`);
|
|
69
|
+
}
|
|
70
|
+
if (exo.hasGeogebra) {
|
|
71
|
+
if (!question.ggbOptions?.coords?.length)
|
|
72
|
+
throw new Error(`exo ${exo.id} has no ggbOptions coords`);
|
|
73
|
+
}
|
|
74
|
+
if (question.ggbOptions) {
|
|
75
|
+
if (!exo.hasGeogebra)
|
|
76
|
+
throw new Error(`exo ${exo.id} has ggbOptions but not hasGeogebra`);
|
|
77
|
+
}
|
|
78
|
+
//! probélamtique car la réponse crée par nous n'est pas toujours au même format que celle fourni par l'élève
|
|
79
|
+
//! voir par ex drawAvector
|
|
80
|
+
// if (exo.answerType === "GGB") {
|
|
81
|
+
// let before = Date.now();
|
|
82
|
+
// console.log("will test ggbVea");
|
|
83
|
+
// expect(
|
|
84
|
+
// exo.isGGBAnswerValid!(question.ggbAnswer!, {
|
|
85
|
+
// ggbAnswer: question.ggbAnswer,
|
|
86
|
+
// ...question.identifiers,
|
|
87
|
+
// }),
|
|
88
|
+
// ).toBe(true);
|
|
89
|
+
// let after = Date.now();
|
|
90
|
+
// let time = after - before;
|
|
91
|
+
// ggbVeaTimes.push(time);
|
|
92
|
+
// if (worstGGBVEATime.time < time) {
|
|
93
|
+
// worstGGBVEATime = {
|
|
94
|
+
// exoId: exo.id,
|
|
95
|
+
// time,
|
|
96
|
+
// };
|
|
97
|
+
// }
|
|
98
|
+
// }
|
|
99
|
+
if (exo.answerType !== "QCM" &&
|
|
100
|
+
exo.answerType !== "QCU" &&
|
|
101
|
+
exo.answerType !== "GGB") {
|
|
102
|
+
if (!question.keys)
|
|
103
|
+
throw new Error(`exo ${exo.id} has no keys`);
|
|
104
|
+
const answer = question.answer;
|
|
105
|
+
let before = Date.now();
|
|
106
|
+
console.log("will test vea : ", exo.id);
|
|
107
|
+
if (!exo.isAnswerValid(answer, { answer, ...question.identifiers })) {
|
|
108
|
+
throw new Error(`exo ${exo.id} has invalid VEA`);
|
|
109
|
+
}
|
|
110
|
+
let after = Date.now();
|
|
111
|
+
veaTime = after - before;
|
|
112
|
+
}
|
|
113
|
+
if (exo.answerType !== "free" && exo.answerType !== "GGB") {
|
|
114
|
+
let before = Date.now();
|
|
115
|
+
console.log("will generate props : ", exo.id);
|
|
116
|
+
const props = exo.getPropositions(4, {
|
|
117
|
+
answer: question.answer,
|
|
118
|
+
...question.identifiers,
|
|
119
|
+
});
|
|
120
|
+
let after = Date.now();
|
|
121
|
+
qcmTime = after - before;
|
|
122
|
+
if (props.length > 4)
|
|
123
|
+
throw new Error(`exo ${exo.id} has too many props`);
|
|
124
|
+
const rightAnswers = props.filter((prop) => prop.isRightAnswer).length;
|
|
125
|
+
if (exo.isQCM) {
|
|
126
|
+
if (rightAnswers < 2)
|
|
127
|
+
throw new Error(`exo ${exo.id} has invalid props`);
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
if (rightAnswers !== 1)
|
|
131
|
+
throw new Error(`exo ${exo.id} has invalid props`);
|
|
132
|
+
}
|
|
133
|
+
props.forEach((prop) => {
|
|
134
|
+
if (prop.statement.match(dotDecimalPattern))
|
|
135
|
+
throw new Error(`exo ${exo.id} has invalid prop`);
|
|
136
|
+
if (prop.statement.includes("[object Object]"))
|
|
137
|
+
throw new Error(`exo ${exo.id} has invalid prop`);
|
|
138
|
+
if (!props.every((prop2) => prop2.id === prop.id || prop.statement !== prop2.statement))
|
|
139
|
+
throw new Error(`exo ${exo.id} has invalid prop`);
|
|
140
|
+
if (prop.format !== "raw") {
|
|
141
|
+
if (!latexTester(prop.statement, true))
|
|
142
|
+
throw new Error(`exo ${exo.id} has invalid prop`);
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
if (question.ggbOptions?.coords) {
|
|
146
|
+
question.ggbOptions?.coords.forEach((element) => {
|
|
147
|
+
if (Math.abs(element) === Infinity)
|
|
148
|
+
throw new Error(`exo ${exo.id} has invalid coords`);
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return {
|
|
153
|
+
veaTime,
|
|
154
|
+
qcmTime,
|
|
155
|
+
};
|
|
156
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simplify.test.d.ts","sourceRoot":"","sources":["../../src/tests/simplify.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { OppositeNode } from "../tree/nodes/functions/oppositeNode.js";
|
|
2
|
+
import { NumberNode } from "../tree/nodes/numbers/numberNode.js";
|
|
3
|
+
import { AddNode } from "../tree/nodes/operators/addNode.js";
|
|
4
|
+
import { FractionNode } from "../tree/nodes/operators/fractionNode.js";
|
|
5
|
+
const data = [
|
|
6
|
+
{
|
|
7
|
+
in: new AddNode(new NumberNode(1), new NumberNode(2)),
|
|
8
|
+
out: new NumberNode(3),
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
in: new FractionNode(new NumberNode(2), new NumberNode(4)),
|
|
12
|
+
out: new FractionNode(new NumberNode(1), new NumberNode(2)),
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
in: new FractionNode(new NumberNode(-2), new NumberNode(4)),
|
|
16
|
+
out: new OppositeNode(new FractionNode(new NumberNode(1), new NumberNode(2))),
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
in: new FractionNode(new NumberNode(2), new NumberNode(-4)),
|
|
20
|
+
out: new OppositeNode(new FractionNode(new NumberNode(1), new NumberNode(2))),
|
|
21
|
+
},
|
|
22
|
+
];
|
|
23
|
+
try {
|
|
24
|
+
for (const d of data) {
|
|
25
|
+
if (!d.in.simplify().equals(d.out))
|
|
26
|
+
throw new Error(`simplify(${d.in}) != ${d.out}`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
catch (err) {
|
|
30
|
+
console.log(err);
|
|
31
|
+
throw err;
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"singleExo.test.d.ts","sourceRoot":"","sources":["../../src/tests/singleExo.test.ts"],"names":[],"mappings":"AAqBA,OAAO,6BAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xl.test.d.ts","sourceRoot":"","sources":["../../src/tests/xl.test.ts"],"names":[],"mappings":"AAGA,OAAO,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { exosTest } from "./exosTest.js";
|
|
2
|
+
import * as PCExercises from "../exercises/pc/index.js";
|
|
3
|
+
import "../prototypesEnhancement.js";
|
|
4
|
+
const pcExercises = Object.values(PCExercises);
|
|
5
|
+
try {
|
|
6
|
+
exosTest(pcExercises);
|
|
7
|
+
}
|
|
8
|
+
catch (err) {
|
|
9
|
+
console.log(err);
|
|
10
|
+
throw err;
|
|
11
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "math-exercises",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.3",
|
|
5
5
|
"description": "Math exercises generator for middle school and high school",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"files": [
|
|
@@ -10,13 +10,12 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"nodemon": "nodemon",
|
|
12
12
|
"dev": "tsx watch src/server.ts",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"testsimplify": "npx jest simplify.test.ts",
|
|
13
|
+
"testexo": "npm run build && node lib/tests/singleExo.test.js",
|
|
14
|
+
"test": "npm run build && node lib/tests/global.test.js",
|
|
15
|
+
"testml": "npm run build && node lib/tests/ml.test.js",
|
|
16
|
+
"testxl": "npm run build && node lib/tests/xl.test.js",
|
|
17
|
+
"testlatex": "npm run build && node lib/tests/latexParser.test.js",
|
|
18
|
+
"testsimplify": "npx jest simplify.test.js",
|
|
20
19
|
"prepublishOnly": "npm run build",
|
|
21
20
|
"build": "tsc && tsc-alias"
|
|
22
21
|
},
|
|
@@ -37,9 +36,11 @@
|
|
|
37
36
|
"body-parser": "^1.20.2",
|
|
38
37
|
"concurrently": "^9.1.2",
|
|
39
38
|
"cors": "^2.8.5",
|
|
39
|
+
"cross-env": "^7.0.3",
|
|
40
40
|
"dotenv": "^16.0.3",
|
|
41
41
|
"express": "^4.18.2",
|
|
42
42
|
"jest": "^29.7.0",
|
|
43
|
+
"jest-esm-transformer": "^1.0.0",
|
|
43
44
|
"node-latex": "^3.1.0",
|
|
44
45
|
"nodemon": "^2.0.22",
|
|
45
46
|
"prettier": "^2.8.4",
|