Add tests for typingSlashWritesDivisionSymbol etc
diff --git a/test/unit/typing.test.js b/test/unit/typing.test.js
index c3c89f1..578af1f 100644
--- a/test/unit/typing.test.js
+++ b/test/unit/typing.test.js
@@ -1065,4 +1065,25 @@
assert.equal(mq.keystroke('Shift-Left').typedText('^').latex(), '^2');
});
});
+
+ suite('alternative symbols when typing / and *', function() {
+ test('typingSlashWritesDivisionSymbol', function() {
+ mq.typedText('/');
+ assertLatex('\\frac{ }{ }');
+
+ mq.config({ typingSlashWritesDivisionSymbol: true });
+
+ mq.keystroke('Backspace').typedText('/');
+ assertLatex('\\div');
+ });
+ test('typingAsteriskWritesTimesSymbol', function() {
+ mq.typedText('*');
+ assertLatex('\\cdot');
+
+ mq.config({ typingAsteriskWritesTimesSymbol: true });
+
+ mq.keystroke('Backspace').typedText('*');
+ assertLatex('\\times');
+ });
+ });
});