Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@datagrok/api-tests

Package Overview
Dependencies
Maintainers
6
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datagrok/api-tests - npm Package Compare versions

Comparing version 1.7.7 to 1.7.8

queries/dummy-query.sql

2

package.json
{
"name": "@datagrok/api-tests",
"friendlyName": "API Tests",
"version": "1.7.7",
"version": "1.7.8",
"author": {

@@ -6,0 +6,0 @@ "name": "Anna Muzychyna",

@@ -12,3 +12,3 @@ import './date-functions';

category('Functions: General', () => {
test('Eval', async () => {
test('eval', async () => {
const dfList: DG.DataFrame[] = await grok.functions

@@ -19,3 +19,3 @@ .eval('OpenServerFile("System:AppData/ApiTests/datasets/demog.csv")');

test('Call', async () => {
test('call', async () => {
const dfList: DG.DataFrame[] = await grok.functions

@@ -26,5 +26,25 @@ .call('OpenServerFile', {'fullPath': 'System:AppData/ApiTests/datasets/demog.csv'});

test('Def param', async () => {
test('def param', async () => {
await grok.functions.call('AddNewColumn', {table: grok.data.demo.demog(), expression: 'test', name: 'test'});
});
// GROK-13478
test('call params', async () => {
expect(await grok.functions.call('sin', {y: 0.5}), null, '{y: 0.5}');
expect(await grok.functions.call('sin', {x: 0.5}), 0.479425538604203, '{x: 0.5}');
expect(await grok.functions.call('sin', {X: 0.5}), 0.479425538604203, '{X: 0.5}');
});
test('query params', async () => {
// expect(await grok.data.query('ApiTests:dummyPackageQuery', {y: 0.5}), null, '{y: 0.5}');
expect((await grok.data.query('ApiTests:dummyPackageQuery', {x: 0.5})).get('res', 0), 0.5, '{x: 0.5}');
expect((await grok.data.query('ApiTests:dummyPackageQuery', {X: 0.5})).get('res', 0), 0.5, '{X: 0.5}');
});
test('Outputs conversion', async () => {
const out = await grok.functions.call('ApiTests:DummyPython');
expect(out.df1 instanceof DG.DataFrame, true); // works with DG.toJs(out.df1)
expect(out.df2 instanceof DG.DataFrame, true); // works with DG.toJs(out.df2)
});
});

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc