Commit 3016603e authored by kosheo's avatar kosheo

Update dependencies.

parent 008dec04
......@@ -16,7 +16,7 @@
'panelWrapper': $('.tex-wrapper')
};
this._katexLoadUrl = 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.9.0-alpha1/katex.min.js';
this._katexLoadUrl = 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.9.0/katex.min.js';
this._katexLoadInProgress = false;
this._initializeUi();
......
......@@ -5,9 +5,9 @@ module.exports = function (config)
frameworks: ['jasmine'],
files:
[
'https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js',
'https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js',
'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js',
'https://cdnjs.cloudflare.com/ajax/libs/mathjs/3.20.1/math.min.js',
'https://cdnjs.cloudflare.com/ajax/libs/mathjs/4.2.2/math.min.js',
'https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css',
'js/**/!(main).js',
'tests/common.js',
......
-
var version = '1.0.0';
var lib =
var lib =
{
'jquery':
'jquery':
{
'js':
'js':
{
'url': 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js',
'integrity': 'sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4='
'url': 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js',
'integrity': 'sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8='
}
},
'bootstrap':
......@@ -27,26 +27,26 @@
{
'css':
{
'url': 'https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/1.11.4/css/jquery.terminal.min.css',
'integrity': 'sha256-BYpiSJaqQaKg97tdVf2QkI7xcopfPOxzQZGfiz7CAhE='
'url': 'https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/1.14.0/css/jquery.terminal.min.css',
'integrity': 'sha256-mq1+xllyX0rV8IK7kgMffZp2PZzBWB1+ZNdnhB338O8='
},
'js':
{
'url': 'https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/1.11.4/js/jquery.terminal.min.js',
'integrity': 'sha256-DSuyGCtznBnMhDIQuNs5ZfW/GH+7WL4940DNUBId5sY='
'url': 'https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/1.14.0/js/jquery.terminal.min.js',
'integrity': 'sha256-ToGKit0KiJNw/mnWsx1diPiHLKU03nSg5Q9KA1YreIM='
}
},
'katex':
{
'css':
{
'url': 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.8.3/katex.min.css',
'integrity': 'sha256-kAbX9Z5ZMhjo34PRGEMc7RiueevlbmDilvUt1NsZGAI='
'url': 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.9.0/katex.min.css',
'integrity': 'sha256-uXNHy6FK52Pb83SmU45mVAg7YECmr9Lwwu1zOz31j5c='
},
'js':
{
'url': 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.8.3/katex.min.js',
'integrity': 'sha256-Jv5VrSHYxxBmh18hQUviB4OiVzOkDHdO0uY4GtrCMDQ='
'url': 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.9.0/katex.min.js',
'integrity': 'sha256-34ADEQM6cIZ7chSRA07lN4aD5JM9IQoeIr2VamKDcT0='
}
},
'jquerymousewheel':
......@@ -61,8 +61,8 @@
{
'js':
{
'url': 'https://cdnjs.cloudflare.com/ajax/libs/mathjs/3.20.1/math.min.js',
'integrity': 'sha256-Y8BOVTySFo5ygzSk7LtA4LpNllmYefp99doCxNIlC90='
'url': 'https://cdnjs.cloudflare.com/ajax/libs/mathjs/4.2.2/math.min.js',
'integrity': 'sha256-tRhxv5eS1muRWknKkTRbDbTU//s8NKodXWwq1uADPww='
}
}
};
This diff is collapsed.
describe ('Custom hex/bin number literals', function ()
{
beforeEach(function() { jasmine.addCustomEqualityTester(texIgnoringResultEqualityTester); });
describe ('Hex Literals', function ()
{
it ('Should convert from hex to decimal correctly', function ()
......@@ -51,7 +51,6 @@ describe ('Custom hex/bin number literals', function ()
expect(calc.evaluate('hex(0)').result).toEqual(createResult('"0x0"'));
expect(calc.evaluate('hex(NaN)').result).toEqual(createResult('"NaN"'));
expect(calc.evaluate('hex(Infinity)').result).toEqual(createResult('"Infinity"'));
expect(calc.evaluate('hex(null)').result).toEqual(createResult('"0x0"'));
expect(calc.evaluate('hex(255)').result).toEqual(createResult('"0xff"'));
expect(calc.evaluate('hex(-1311768467294899695)').result).toEqual(createResult('"-0x1234567890abcdef"'));
expect(calc.evaluate('hex(pi)').result).toEqual(createResult('"0x3.243f6a8885a308d313198a2e03707344a4093822299f31d0082eda2e358c7c9"'));
......@@ -129,7 +128,6 @@ describe ('Custom hex/bin number literals', function ()
expect(calc.evaluate('bin(0)').result).toEqual(createResult('"0b0"'));
expect(calc.evaluate('bin(NaN)').result).toEqual(createResult('"NaN"'));
expect(calc.evaluate('bin(Infinity)').result).toEqual(createResult('"Infinity"'));
expect(calc.evaluate('bin(null)').result).toEqual(createResult('"0b0"'));
expect(calc.evaluate('bin(255)').result).toEqual(createResult('"0b11111111"'));
expect(calc.evaluate('bin(-1623369211292499550)').result).toEqual(createResult('"-0b1011010000111010111011011001001011010011001010011111001011110"'));
expect(calc.evaluate('bin(pi)').result).toEqual(createResult('"0b11.00100100001111110110101010001000100001011010001100001000110101"'));
......
describe ('Calculator:Sanity', function ()
{
beforeEach(function() { jasmine.addCustomEqualityTester(texIgnoringResultEqualityTester); });
describe ('Formatting', function ()
{
it ('Should format numbers correctly', function ()
......@@ -10,16 +10,16 @@ describe ('Calculator:Sanity', function ()
expect(calc.evaluate('0')).toEqual(createEvaluatedExpression('0', '0'));
expect(calc.evaluate('-0')).toEqual(createEvaluatedExpression('-0', '0'));
expect(calc.evaluate('000')).toEqual(createEvaluatedExpression('000', '0'));
expect(calc.evaluate('0.0')).toEqual(createEvaluatedExpression('0.0', '0'));
expect(calc.evaluate('1.000')).toEqual(createEvaluatedExpression('1.000', '1'));
expect(calc.evaluate('000')).toEqual(createEvaluatedExpression('0', '0'));
expect(calc.evaluate('0.0')).toEqual(createEvaluatedExpression('0', '0'));
expect(calc.evaluate('1.000')).toEqual(createEvaluatedExpression('1', '1'));
expect(calc.evaluate(repeatString('1', settings.precision)))
.toEqual(createEvaluatedExpression(repeatString('1', settings.precision), repeatString('1', settings.precision)));
.toEqual(createEvaluatedExpression('1.' + repeatString('1', settings.precision - 1) + '\\cdot10^{+' + (settings.precision - 1) + '}', repeatString('1', settings.precision)));
expect(calc.evaluate(repeatString('1', settings.precision) + '.000'))
.toEqual(createEvaluatedExpression(repeatString('1', settings.precision) + '.000', repeatString('1', settings.precision)));
.toEqual(createEvaluatedExpression('1.' + repeatString('1', settings.precision - 1) + '\\cdot10^{+' + (settings.precision - 1) + '}', repeatString('1', settings.precision)));
expect(calc.evaluate('0.' + repeatString('0', settings.precision - 1) + '1000'))
.toEqual(createEvaluatedExpression('0.' + repeatString('0', settings.precision - 1) + '1000', '0.' + repeatString('0', settings.precision - 1) + '1'));
expect(calc.evaluate('1e+2')).toEqual(createEvaluatedExpression('1\\cdot10^{+2}', '100'));
.toEqual(createEvaluatedExpression('1\\cdot10^{-' + settings.precision + '}', '0.' + repeatString('0', settings.precision - 1) + '1'));
expect(calc.evaluate('1e+2')).toEqual(createEvaluatedExpression('100', '100'));
});
});
......
......@@ -9,7 +9,7 @@ describe ('TeX', function ()
expect(calc.evaluate('2/3').tex).toEqual('\\frac{2}{3}');
expect(calc.evaluate('2^2').tex).toEqual('{2}^{2}');
expect(calc.evaluate('pi').tex).toEqual('\\pi');
expect(calc.evaluate('true').tex).toEqual('\\mathrm{True}');
expect(calc.evaluate('true').tex).toEqual('true');
expect(calc.evaluate('"hello"').tex).toEqual('\\mathtt{"hello"}');
expect(calc.evaluate('2+3i').tex).toEqual('2+3~ i');
expect(calc.evaluate('0xff').tex).toEqual('255');
......@@ -29,7 +29,7 @@ describe ('TeX', function ()
expect(calc.evaluate('12345').result.tex).toEqual('12345');
expect(calc.evaluate('-1/2').result.tex).toEqual('-0.5');
expect(calc.evaluate('true').result.tex).toEqual('\\mathrm{True}');
expect(calc.evaluate('true').result.tex).toEqual('true');
expect(calc.evaluate('"hello"').result.tex).toEqual('\\mathtt{"hello"}');
expect(calc.evaluate('2+3i').result.tex).toEqual('2+3~ i');
expect(calc.evaluate('0xff').result.tex).toEqual('255');
......
describe ('Unicode extension', function ()
{
beforeEach(function() { jasmine.addCustomEqualityTester(texIgnoringResultEqualityTester); });
describe ('Unicode code points', function ()
{
it ('Should convert string to code points list correctly', function ()
......@@ -11,7 +11,7 @@ describe ('Unicode extension', function ()
expect(calc.evaluate('toCodePoints("")').result).toEqual(createResult('[]'));
expect(calc.evaluate('toCodePoints("0")').result).toEqual(createResult('[48]'));
expect(calc.evaluate('toCodePoints("$¢€𐍈")').result).toEqual(createResult('[36, 162, 8364, 66376]'));
expect(calc.evaluate('toCodePoints(" \tascii^")').result).toEqual(createResult('[32, 9, 97, 115, 99, 105, 105, 94]'));
expect(calc.evaluate('toCodePoints(" ascii^")').result).toEqual(createResult('[32, 97, 115, 99, 105, 105, 94]'));
expect(calc.evaluate('toCodePoints("𝐀𝐁♡💩")').result).toEqual(createResult('[119808, 119809, 9825, 128169]'));
expect(calc.evaluate('toCodePoints("ññ")').result).toEqual(createResult('[241, 110, 771]'));
expect(calc.evaluate('toCodePoints("Iñtërnâtiônàlizætiøn☃")').result)
......@@ -25,7 +25,7 @@ describe ('Unicode extension', function ()
expect(calc.evaluate('fromCodePoints([])').result).toEqual(createResult('""'));
expect(calc.evaluate('fromCodePoints([49])').result).toEqual(createResult('"1"'));
expect(calc.evaluate('fromCodePoints([36, 162, 8364, 66376])').result).toEqual(createResult('"$¢€𐍈"'));
expect(calc.evaluate('fromCodePoints([32, 9, 97, 115, 99, 105, 105, 94])').result).toEqual(createResult('" \tascii^"'));
expect(calc.evaluate('fromCodePoints([32, 97, 115, 99, 105, 105, 94])').result).toEqual(createResult('" ascii^"'));
expect(calc.evaluate('fromCodePoints([119808, 119809, 9825, 128169])').result).toEqual(createResult('"𝐀𝐁♡💩"'));
expect(calc.evaluate('fromCodePoints([241, 110, 771])').result).toEqual(createResult('"ññ"'));
expect(calc.evaluate('fromCodePoints([73, 241, 116, 235, 114, 110, 226, 116, 105, 244, 110, 224, 108, 105, 122, 230, 116, 105, 248, 110, 9731])').result)
......@@ -44,7 +44,7 @@ describe ('Unicode extension', function ()
expect(calc.evaluate('toUtf8("")').result).toEqual(createResult('[]'));
expect(calc.evaluate('toUtf8("0")').result).toEqual(createResult('[48]'));
expect(calc.evaluate('toUtf8("$¢€𐍈")').result).toEqual(createResult('[36, 194, 162, 226, 130, 172, 240, 144, 141, 136]'));
expect(calc.evaluate('toUtf8(" \tascii^")').result).toEqual(createResult('[32, 9, 97, 115, 99, 105, 105, 94]'));
expect(calc.evaluate('toUtf8(" ascii^")').result).toEqual(createResult('[32, 97, 115, 99, 105, 105, 94]'));
expect(calc.evaluate('toUtf8("𝐀𝐁♡💩")').result).toEqual(createResult('[240, 157, 144, 128, 240, 157, 144, 129, 226, 153, 161, 240, 159, 146, 169]'));
expect(calc.evaluate('toUtf8("ññ")').result).toEqual(createResult('[195, 177, 110, 204, 131]'));
expect(calc.evaluate('toUtf8("Iñtërnâtiônàlizætiøn☃")').result)
......@@ -58,7 +58,7 @@ describe ('Unicode extension', function ()
expect(calc.evaluate('fromUtf8([])').result).toEqual(createResult('""'));
expect(calc.evaluate('fromUtf8([48])').result).toEqual(createResult('"0"'));
expect(calc.evaluate('fromUtf8([36, 194, 162, 226, 130, 172, 240, 144, 141, 136])').result).toEqual(createResult('"$¢€𐍈"'));
expect(calc.evaluate('fromUtf8([32, 9, 97, 115, 99, 105, 105, 94])').result).toEqual(createResult('" \tascii^"'));
expect(calc.evaluate('fromUtf8([32, 97, 115, 99, 105, 105, 94])').result).toEqual(createResult('" ascii^"'));
expect(calc.evaluate('fromUtf8([240, 157, 144, 128, 240, 157, 144, 129, 226, 153, 161, 240, 159, 146, 169])').result).toEqual(createResult('"𝐀𝐁♡💩"'));
expect(calc.evaluate('fromUtf8([195, 177, 110, 204, 131])').result).toEqual(createResult('"ññ"'));
expect(calc.evaluate('fromUtf8([73, 195, 177, 116, 195, 171, 114, 110, 195, 162, 116, 105, 195, 180, 110, 195, 160, 108, 105, 122, 195, 166, 116, 105, 195, 184, 110, 226, 152, 131])').result)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment