mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 03:01:21 -04:00
* Tinymath is now a Kibana package * Rename to @kbn/tinymath * Update import style * Update README * Use commonjs import syntax * Fix to commonjs export * More commonjs fixes
20 lines
629 B
JavaScript
20 lines
629 B
JavaScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
* and the Server Side Public License, v 1; you may not use this file except in
|
|
* compliance with, at your election, the Elastic License or the Server Side
|
|
* Public License, v 1.
|
|
*/
|
|
|
|
const { sin } = require('../../src/functions/sin.js');
|
|
|
|
describe('Sine', () => {
|
|
it('numbers', () => {
|
|
expect(sin(0)).toEqual(0);
|
|
expect(sin(1.5707963267948966)).toEqual(1);
|
|
});
|
|
|
|
it('arrays', () => {
|
|
expect(sin([0, 1.5707963267948966])).toEqual([0, 1]);
|
|
});
|
|
});
|